For words with lots of overlap in prefixes (for example, all words start with "foo", a try would save three characters per word), it might take up less memory. But you'll end up with lots of short strings, and in Lua each string is a value, with associated overhead in memory, for garbage collection and things like that.kikito wrote:For the tables, yes. For the strings, not so much. A big table with all the possible words would probably use up more memory IMHO.Robin wrote:(but there is also a lot of overhead for all those strings and tables)
We should test is really, but I'm not really in the mood for SCIENCE! right now.
I think I tried tries in Python, but it might also have been Lua, and it had really bad performance.