Is using BSF instruction instead of using GNU C __builtin_ctz inefficient?
-
- Posts: 2
- Joined: 2023-12-23, 6:25:39
Is using BSF instruction instead of using GNU C __builtin_ctz inefficient?
I posted this question on stackoverflow: https://stackoverflow.com/questions/777 ... imd-vector. The answer claims, among others, that using "legacy BSF instruction (slow on AMD), instead of using GNU C __builtin_ctz on non-MSVC" is inefficient. Is that accurate? I find performance of VCL to be very good, but perhaps it can be even better.
Re: Is using BSF instruction instead of using GNU C __builtin_ctz inefficient?
__builtin_ctz is not portable to all compilers. I don't think there is any difference in performance. Let's keep this discussion on stackoverflow. Remember to use the tag "vector-class-library" on stackoverflow.