Re: LuaJIT benchmark

  • From: Mike Pall <mike-1403@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 16 Mar 2014 23:57:12 +0100

Fredrik Widlund wrote:
> Benchmark of LuaJIT tables vs Java HashMap vs C++ unordered_map

Sigh, the Lua program doesn't even use local variables in the
inner loop ...

Oh, and before anyone thinks this really measures hash table
implementation quality: it's just measuring the overhead of branch
mispredictions and cache misses for an atypical use case of hash
tables.

[Typical hash table accesses use a) string keys with b) a high
temporal correlation and c) they usually have a high hit-rate or a
high miss-rate, but it's rarely 50/50.]

--Mike

Other related posts: