lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 16 December 2017 at 06:46,  <> wrote:
>> 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?

Believe it is :

sysctl -n machdep.cpu.brand_string

Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz

So I am not the most recent architecture.

> 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.

How do you measure branch-misprediction rate?

Thanks and Regards