lua-users home
lua-l archive

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


On Thu, Oct 25, 2007 at 09:04:02PM +0200, Mike Pall wrote:
> Another data point: I've almost completed the new interpreter
> core for LuaJIT 2.x. It's written in carefully tuned assembler
> code, it uses a more efficient bytecode, it's optimized to reduce
> branch prediction misses and cache misses and to improve
> scheduling and instruction-level parallelism. First experiments
> show it to be sometimes up to 2x-3x faster than the standard Lua
> interpreter (written in C). This is just for the interpreter!

Out of curiosity, has anyone tried optimizing the interpreter loop with
__builtin_expect?  Judicious use to correct the compiler guessing about
branches can make a big difference.

-- 
Glenn Maynard