Hacker News new | ask | show | jobs
by curiousmindz 1293 days ago
In C#, you can write (pseudo-code): if (AVX2) { ... } else if (SSE) { ... } else ...

Then, when you run the program, the JIT will pick the first supported option and eliminate the other ones.