lua-cmsgpack
lua-cmsgpack copied to clipboard
unpack performance optimization: preallocate the table when unpack map
lua_newtable function is equivalent to lua_createtable(L, 0, 0). The rehashing will cost too much time. The benchmark show the preallocate is faster ~30% than original version on random data.