Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
vm: use computed goto instead of switch
See http://eli.thegreenplace.net/2012/07/12/computed-goto-for-efficient-dispatch-tables Benchmark: https://github.com/starius/lang-bench/blob/master/f3/test.lua $ time ./src/lua.orig ~/lang-bench/f3/test.lua 499500 real 0m28.208s user 0m28.166s sys 0m0.004s $ time ./src/lua ~/lang-bench/f3/test.lua 499500 real 0m25.066s user 0m25.030s sys 0m0.000s Speedup: 1.12
- Loading branch information
Showing
1 changed file
with
64 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters