BTW, I remember that Fabien wanted to serialize such stuff for Metalua.
Engram is too slow to be considered even marginally useful. Serialization to Lua source is much faster (and more secure).
The full benchmark below was run with bench.engram/unengram commented out.
lua
-------------------------------------------------------------------
name | rel | abs s / iter = us (1e-6 s) / iter
-------------------------------------------------------------------
luabins_load | 1.0000 | 5.68 / 1000000 = 5.680000 us
luabins_save | 1.1479 | 6.52 / 1000000 = 6.520000 us
marshal | 1.1954 | 6.79 / 1000000 = 6.790000 us
unmarshal | 1.5581 | 8.85 / 1000000 = 8.850000 us
loadstring | 3.3151 | 18.83 / 1000000 = 18.830000 us
concat | 9.4401 | 53.62 / 1000000 = 53.620000 us
tstr | 12.3644 | 70.23 / 1000000 = 70.230000 us
tserialize | 16.6021 | 94.30 / 1000000 = 94.300000 us
Modern LJ2 seems to be too smart for my benchmark (or I did break something), so no results for LJ2 this time.
Alexander.