[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: __index returns truncated to one, why?
- From: Sean Conner <sean@...>
- Date: Thu, 10 Apr 2014 21:39:18 -0400
It was thus said that the Great Geoff Leyland once stated:
> On 11/04/2014, at 11:57 am, Sean Conner <sean@conman.org> wrote:
>
> > Thanks. Wow. Okay. That is quite significant.
> >
> > I also like that you profiled before changing the code.
>
> Yeah, well... “luajit -jp” is a sampling profiler, not an exact profiler
> like luatrace [1], so it gives time spent but not execution counts. So I
> failed to notice that the real problem was that things were getting called
> far more often than they really should have been.
Don't be so dismissive of sampling profilers. I can see a scenario where
one Lua function has a low execution count but takes more time than another
Lua function that has a higher execution count [2].
-spc (Measure twice, cut once, realize you used the wrong units ... )
> [1] https://github.com/geoffleyland/luatrace (I wrote it). Unfortunately
> it's slooooow and doesn’t work in JITted code.
[2] Lua function 1 calls a C function that sucks up CPU time, for
example. Then again, I'm talking about the Lua interpreter, not
necessarily LuaJIT.
- References:
- Re: __index returns truncated to one, why?, Sean Conner
- Re: __index returns truncated to one, why?, Thiago L.
- Re: __index returns truncated to one, why?, steve donovan
- Re: __index returns truncated to one, why?, Javier Guerra Giraldez
- Re: __index returns truncated to one, why?, Andrew Starks
- Re: __index returns truncated to one, why?, Geoff Leyland
- Re: __index returns truncated to one, why?, Sean Conner
- Re: __index returns truncated to one, why?, Geoff Leyland
- Re: __index returns truncated to one, why?, Sean Conner
- Re: __index returns truncated to one, why?, Geoff Leyland