Lua only has 5 "data" types: nil, bool, number, string, and table. There is also "userdata" (defined in C)
Would this improve performance for functions that take in the non-table types? Or does it provide some mechanism for structured data besides tables?
I have a hard time believing there are many performance gains to be had for the few functions that take in only native types. I suppose compiling those could have major performance improvements in a few tight-loop use-cases?
Comments
Love it but don't quite get it.
Lua only has 5 "data" types: nil, bool, number, string, and table. There is also "userdata" (defined in C)
Would this improve performance for functions that take in the non-table types? Or does it provide some mechanism for structured data besides tables?
I have a hard time believing there are many performance gains to be had for the few functions that take in only native types. I suppose compiling those could have major performance improvements in a few tight-loop use-cases?
You forgot in Lua 5.3+ "integer". (there's also "thread" for coroutines and "function", but those aren't "data" types)
Integer is a good point. I just learned about math.type in 5.3!