crystalizer
crystalizer copied to clipboard
inline math
Currently in the cache_call plugin, if it runs into a > b
it will do a call cached_call_lookup_and_run(a, ">", b)
I'd imagine that "if the method is a math-looking one" then you could add an if statement like...
if TYPE(a) == T_FIXNUM && TYPE(b) == T_FIXNUM RCHECK(FIX2LONG(a) > FIX2LONG(b)) else
do the method call
end
in the c code for cache_call.
This might speed up ridiculous benchmarks like "tak"
There are also faster check macros for fixnums and nil.
FIXNUM_P(obj)