4 ms·
If you are worried about branching then use perf to profile it and see how many branch misses you have. You might be guessing 90%+ correctly and not actually ha
by bick_nyers 4y ago
If you are worried about branching then use perf to profile it and see how many branch misses you have. You might be guessing 90%+ correctly and not actually have anything to worry about.
https://en.m.wikipedia.org/wiki/Branch_predictor https://en.m.wikipedia.org/wiki/Branch_predictor
You can probably use SIMD just fine.
You can get an EPYC with a shit ton of CPU cache, 100MB is easy. Faster & higher IPC cores can be better than more cores. Even at 100MB per core you can do some work on the code to make it have better cache locality so that the CPU cache prefetcher(s) handle that constraint well. I am guessing C/C++? Are you compiling with -O3 and profile-guided-optimization (GCC)?
Worst case scenario throw it on an FPGA :)