Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
Last active July 12, 2020 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cellularmitosis/55ff55b55008b2f1c42b4d0e46f58c76 to your computer and use it in GitHub Desktop.
Save cellularmitosis/55ff55b55008b2f1c42b4d0e46f58c76 to your computer and use it in GitHub Desktop.
Graphing the LuaJIT benchmarks to compare architectures

Blog 2020/6/10   (retroactively blogged on 2020/6/12)

<- previous | index | next ->

Graphing the LuaJIT benchmarks to compare architectures

LuaJIT is an amazingly fast implementation of Lua which uses just-in-time compilation.

On their website, they use a number of benchmarks to compare the performance boost of their JIT'ed implementation vs. the stock Lua interpreter.

luajit

However, they don't present the information in a way which makes it easy to see the performance differences between architectures.

I copied their numbers into a spreadsheet, normalized each benchmark, and then graphed each architecture against x86.

In most cases, the JIT performance boost isn't quite as large on other architectures.

Note: these are comparisons of JIT boost, not comparisons of absolute performance. If the graph indicates 50%, that means that architecture's JIT sees only 50% of the speedup seen by the x86 JIT over the stock Lua interpreter.

x86_64

I was surprised to see that x86_64 generally doesn't see as much of a JIT boost as x86 (with the exception of nbody).

x86_64

ARM

ARM sees a slightly smaller speedup than x86_64 (with the exception of nsieve-bit).

arm

PowerPC

PowerPC sees a yet smaller boost, sometimes dipping below 50% of x86's JIT boost.

ppc

MIPS

MIPS sees a still smaller boost overall, with the exception of an extreme outlier: nsieve sees over twice the speedup of x86.

mips

The MIPS graph with nsieve clipped:

mips2

All architectures

all1

all2

The numbers

lua

normalized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment