LuaHashMap & Hash Table Shootout 2:
Rise of the Interpreter Machines


inTextMediumImage

I needed a hash table library for C. Instead of reinventing the wheel, I wrote LuaHashMap, which wraps Lua's C-API to access Lua's table system. I turned the traditional Lua embedding and extending paradigm on its head. 

LuaHashMap offers a nice, easy to use API for C for hash tables and Lua itself just becomes an implementation detail. It is now finished and open sourced for everybody who needs a fast, easy to use hash table library in C.

It's pretty crazy, but useful. What's even crazier is that I also did benchmarks and turned it into a hash table and language shootout. So I involved C++ std::unordered_map, Perl, Python, Ruby, and Tcl. But just like how I turned the Lua embedding paradigm on its head, I also turned the language shootout on its head. The rules are that all the code is written in C and everything talks to the language's C APIs.

I found some of the results surprising and interesting. You should check it out too.

http://playcontrol.net/opensource/LuaHashMap/


Copyright © PlayControl Software, LLC / Eric Wing