[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Extract a list of keys from table
- From: "Javier Guerra" <javier@...>
- Date: Fri, 18 Jul 2008 16:58:29 -0500
On Fri, Jul 18, 2008 at 4:42 PM, Mike Pall <email@example.com> wrote:
> This applies even more so to LuaJIT 2.x: calling an "unknown" C
> function inside a loop effectively disables JIT compilation for
> this loop. Here "unknown" means the JIT compiler has no idea about
> its potential side-effects (note that most of the standard library
> functions are of course "known" to the compiler).
are you planning an API to "introduce" new functions to the JIT?
of course, a misleading 'introduction' would create weird bugs...
using such a feature should only be a very last optimization, much
later than writing the C function.
> All other tests run (or should run [*]) in around 0.0047s. :-)
> This is because everything can be hoisted out of the loop. The
> loop itself runs at 1 cycle/iteration, i.e. maximum CPU speed.
> The perils of microbenchmarking ...
do you mean that LuaJIT 2.x realizes that the iterations 1-9999999 (or
maybe iterations 2-10M) don't do any new work and executes only once?
you're making it even harder to wait...
> [*] Not all of them can be compiled (yet). Sorry, still no ETA.