|
|
|
|
|
by celeritascelery
462 days ago
|
|
How do you reconcile that with the observation that moving to a computed goto style provides better codegen in zig[1]? They make the claim that using their “labeled switch” (which is essentially computed goto) allows you to have multiple branches which improves branch predictor performance. They even get a 13% speedup in their parser from switch to this style. If modern CPU’s are good at predicting through a single branch, I wouldn’t expect this feature to make any difference. [1] https://ziglang.org/download/0.14.0/release-notes.html#Code-... |
|