4 ms·
Practically all modern CPUs have indirect branch prediction. The overhead of a function pointer call is practically zero unless the target of the function poin
by DarkShikari 17y ago
Practically all modern CPUs have indirect branch prediction. The overhead of a function pointer call is practically zero unless the target of the function pointer is actually completely random, which it rarely is: most of the time it's constant for a long period of time (e.g. an in inner loop) until it's changed.