Open Unisay opened 7 months ago
local add = function(x) return function(y) return x + y end end
is two times slower than
local add = function(x, y) return x + y end
The idea is to rewrite former to latter but only for functions that are always fully-applied, e.g. a partial application
add(i)
never happens in the program being compiled;
The applications need to be rewritten too:
add(x)(y) ===> add(x,y)
is two times slower than
The idea is to rewrite former to latter but only for functions that are always fully-applied, e.g. a partial application
never happens in the program being compiled;
The applications need to be rewritten too: