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,  <hgualandi@inf.puc-rio.br> 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 :
https://ark.intel.com/products/80807/Intel-Core-i7-4790K-Processor-8M-Cache-up-to-4_40-GHz

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
Dibyendu