lua_newtable() definition:
#define lua_newtable(L) lua_createtable(L, 0, 0)
This simply allocates space for 0 fields, meaning, if we push any
values into this array, it will re-allocate the array, which is bad.
This function statically allocates an array, so it's ready to have
X fields into it.
Performance tests:
lua_newtable
1428161
1426992
1413513
lua_createtable
2004544
1974117
1957533
These tests were done on an AMD 8350fx CPU, single thread used.
narr: This is for fields that just have an index, e.g. arr[0] etc.
nrec: For fields which needs like arr.a, arr.b etc.
This is how many times each of the functions can run per second, as
you can see about 1.7x the calls to lua_newtable.
All credits goes to @dalkon, he was too lazy to do it by himself, and
asked me to do it for him.
* Begin working on a new layout system for UIMinimap and later UIMap,
this new layout system allows to add widgets to the minimap
* Add option to disable motd
* Rework hotkey binding
* Lots of fixes in hotkeys manager
* Add fullmap view using Ctrl+Shift+M
* Prevent some crashs in ThingType draw
* Add function to load minimap from PNG files
* Fixes in minimap saving
* Fixes in Tile::isClickable
* Add UIMapAnchorLayout, new layout for maps
* Fix freezes in win32 when pressing alt key
Make otclient's framework flexible enough to run console apps like
servers, so this mean is possible to build otclient versions without
graphical interface and use it's framework to code servers