lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Isn't LuaJIT smart enough to recognize that in a given code path
math.log is always called with no base or a 10 base, and plug the
right optimization in those cases ? I'm no expert, but I thought such
optimizations were what tracing JITs were designed to allow.

I'm not sure, but wouldn't that be happening in this function:

TRef lj_opt_narrow_pow(jit_State *J, TRef rb, TRef rc, TValue *vc)

from this file src/lj_opt_narrow.c

Just a wild guess really, I need to read every luajit line for at least a minute to understand. There is very much knowledge missing from my head about this kind of stuff...