Hacker News new | ask | show | jobs
by awalton 4188 days ago
Well, you can write that code that tries to decide, or you can let GCC emit that code for you: https://gcc.gnu.org/wiki/FunctionMultiVersioning

All you need to do is figure out what's the best version of that function to write for that target, and let GCC do the rest of the heavy lifting.