Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moderately increase speed of compute_cost in sabre
This commit modies the heuristic scoring function compute_cost in the sabre swap rust code to use a faster sum implementation. This is based on the fast_sum() used in the pauli expectation value module but modified to deal with the different data structures used in sabre. This new implementation enables the compiler to more easily use SIMD when available. This is about as fast as we can make a sume of values of indeterminite length without dropping to use SIMD intrinsics directly, either for x86/x86_64 with an unsafe calls (via the simdeez library) or requiring nightly rust and using packed_simd_2 or stdsimd which is cross platform. While this isn't a huge performance boost, it does provide a 1-10% speed up to compute cost in local testing.
- Loading branch information