Hacker News new | ask | show | jobs
by eesmith 2805 days ago
That is true. Here's a couple of negatives. First, you still need to build once for each architecture, either as different executables, or as different object files, and provide some dispatch mechanism to use the right one based on what hardware is available.

Second, if the intrinsics aren't built-in then there may be faster alternatives than using the GCC emulated version.

1 comments

You must be thinking about GCC "builtins" because there is no emulation for x86 SIMD intrinsics (ie the things in <immintrin.h>).
Oh, indeed I was. Thanks for pointing out my error. I was specifically thinking about POPCNT.