In short, seems that __builtin_expect not work with switch(), at least for gcc version 8.5.0 20210514(RHEL).
For forward-facing optimizations, please don't use an ancient version of gcc as the benchmark.
-hpa
In short, seems that __builtin_expect not work with switch(), at least for gcc version 8.5.0 20210514(RHEL).
For forward-facing optimizations, please don't use an ancient version of gcc as the benchmark.
-hpa