[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: log/log10 in Lua 5.2.0-alpha
- From: "Dimiter \"malkia\" Stanev" <malkia@...>
- Date: Sun, 22 May 2011 22:07:18 -0700
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...