Closed agladysh closed 11 years ago
Using collectgarbage() makes no difference at all. Honestly, I think local print = print
is over-optimization. That is not the way most Lua programmers write Lua. Also, I/O is not necessarily bad as long as it is not the bottleneck. It is not in this case and in the dictionary benchmark, in theory. (I will come to issue #13 later about this topic)
Hmm, that is interesting. No difference — even for plain Lua?
LuaJIT only. Haven't tried Lua.
Well, local
aliases are an optimization for plain Lua, as I stated in the comment.
For plain Lua, slower with collectgarbage. EDIT: at least not faster.
That is not the way most Lua programmers write Lua.
"Most" is arguable. We have about 600KLOC written in this style.
Note that the performance is not the only reason. If you do not do aliasing, your code wouldn't work in the sandbox with a custom global environment.
Couple of links from three seconds of googling:
For plain Lua, slower with collectgarbage. EDIT: at least not faster.
OK, this means that I misinterpreted that 999
. See #18.
Ok. I buy your argument. But anyway, no improvement to speed.
Ok. I buy your argument. But anyway, no improvement to speed.
Even not for plain Lua? Strange. Thanks for trying, anyway.
Something along these lines:
I'll submit a pull request if you'd do #14.