4 ms·
> switch statements with more than 128 cases are not optimised in V8 I recently saw this in Petka Antonov's "Optimization Killers"[1], though I've definitely s
by XaspR8d 12y ago
> switch statements with more than 128 cases are not optimised in V8
I recently saw this in Petka Antonov's "Optimization Killers"[1], though I've definitely seen it somewhere else as well, because I recall hearing that variables mixed with literals in a switch could trip up the optimizer.
[1] https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#4-switch-case https://github.com/petkaantonov/bluebird/wiki/Optimization-k...