Hacker News new | ask | show | jobs
by Jasper_ 2092 days ago
Not always. Computed gotos can be faster, because it can relax some restrictions that the switch statement can't amke. Most VM implementations, including CPython, use computed gotos for a not insignificant performance improvement.

https://github.com/python/cpython/blob/master/Python/ceval.c...