3 ms·
Did you actually read it? It compares three cases: dynamic linking, calls through a function pointer and calls where the address to call is compiled directly in
by BeeOnRope 8y ago
Did you actually read it? It compares three cases: dynamic linking, calls through a function pointer and calls where the address to call is compiled directly into an immediate call instruction using a small JIT intended to emulate the LuaJIT case.
The benchmark didn't even include a static linking case! In general, however, I expect the static linking case to perform like the JIT case since both will almost always use a call with 32-bit relative immediate jump. I was a bit confused about why the article author chose to write a JIT rather than just use static linking, since I think they achieve the same thing here.