I’m trying to port my old word game from native Java to Corona SDK. I use binary search tree in that game since it have good balance between size and speed.
When it comes to Lua, I’m not sure if I should do the same. I assume Lua table is internally a hash table, but for hash table to have good performance, number of buckets should be way more than the number of keys.
On another hand, if I implement a binary search tree, I will have to use a lot of small Lua tables to represent the nodes of the tree.
So, I’m not sure which one has smaller overhead. Please let me know what do you think. Thanks.