[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua performance
- From: hgualandi@...
- Date: Sat, 16 Dec 2017 04:46:59 -0200 (-02)
> All are interpreter timings on 64-bit Mac OSX 10.11.6. My impression is
that on Mac OSX at least computed goto's are worth having as an option.
A while ago I also tested the effect that computed gotos had on the Lua
interpreter and it depended a lot on the microarchitecture of the CPU. Do
you know what is the CPU model that you ran the tests in?
When I tested in a machine with a Sandy Bridge CPU the default Lua
interpreter had a high branch-misprediction rate, which improved after
switching to computed gotos. However, when I tested on a more recent
recent Haswell machine the indirect branch predictor was able to predict
the branching behavior of the interpreter loop just fine, and the computed
gotos were not needed.