ashvardanian / StringZilla

Up to 10x faster strings for C, C++, Python, Rust, and Swift, leveraging SWAR and SIMD on Arm Neon and x86 AVX2 & AVX-512-capable chips to accelerate search, sort, edit distances, alignment scores, etc 🦖
https://ashvardanian.com/posts/stringzilla/
Apache License 2.0
1.92k stars 64 forks source link

Fixed CMake not settings some compiler flags correctly #130

Closed ashbob999 closed 3 months ago

ashbob999 commented 4 months ago

Fixes #124

ashbob999 commented 4 months ago

As a side note, what is the reason for disabling the built-in functions for testing/benchmarks (I know it's needed for the standalone binary)?

https://github.com/ashvardanian/StringZilla/blob/57209cb389d28e63cf5238af01296db995342b61/CMakeLists.txt#L164-L169

Because these flags are also supported by Clang, but I didn't modify them because I wasn't sure what there purpose was.

ashvardanian commented 4 months ago

@ashbob999, we should avoid built-ins on all compilers, to benchmark the throughput of pure StringZilla implementations that wouldn't call LibC for some operations under the hood.

ashbob999 commented 4 months ago

@ashbob999, we should avoid built-ins on all compilers, to benchmark the throughput of pure StringZilla implementations that wouldn't call LibC for some operations under the hood.

Ok, that makes sense. So we should add the options for Clang/AppleClang/MSVC as well. Any reason the specific ones are eased instead of the general -fno-builtin.

Would this decrease the performance of the other benchmarks?

ashvardanian commented 3 months ago

:tada: This PR is included in version 3.7.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: