|
|
|
|
|
by mrmuagi
2678 days ago
|
|
It's actually a big issue in any performance critical regions of code. I've come across this in both the network stack and the file system (user space and kernel). Switches can sometimes be optimised away into O(1) using clever static compile time tricks, but if you rely on jump indirection you get branch misdirection penalties, or even worse for a ladder of if's, you are doing O(N) work (where N is number of cases). |
|