With ANN search, we accept giving up accuracy for speed. Since most of the code in jvector_simd.c deals in floating-point computations, it may make sense to pass—fp-model=fast to the GCC compiler at build time. Even though most of the code is directly coded using intrinsics, there should be no harm in passing this option.
With a fast floating point model, the compiler attempts several value-unsafe optimizations[1], like reassociation and parallel reductions (maybe we can replace reduction intrinsics with equivalent C-code and let the compiler do the magic).
With ANN search, we accept giving up accuracy for speed. Since most of the code in jvector_simd.c deals in floating-point computations, it may make sense to pass—fp-model=fast to the GCC compiler at build time. Even though most of the code is directly coded using intrinsics, there should be no harm in passing this option.
With a fast floating point model, the compiler attempts several value-unsafe optimizations[1], like reassociation and parallel reductions (maybe we can replace reduction intrinsics with equivalent C-code and let the compiler do the magic).
Best Regards, Jatin [1] https://www.nccs.nasa.gov/images/FloatingPoint_consistency.pdf