Let's benchmark modulo operator.
The code is here:
pastebin.com/13XBxdn6
The Lua executables are x64 exe-files built with VS2010.
The results:
C:\>lua51.exe addition_benchmark.lua
CPU seconds for floating point addition: 1.185
C:\>lua52.exe addition_benchmark.lua
CPU seconds for floating point addition: 1.093
C:\>lua53.exe addition_benchmark.lua
CPU seconds for integer addition: 1.107
CPU seconds for floating point addition: 1.556
C:\>lua54.exe addition_benchmark.lua
CPU seconds for integer addition: 1.452
CPU seconds for floating point addition: 1.717
Why numeric addition (the simplest thing in Lua) become slower starting with Lua 5.3?
Is it because of detecting operand subtypes (int/float) inside every "ADD" instruction?