[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: newproxy, bug
- From: Mike Pall <mikelu-1101@...>
- Date: Tue, 11 Jan 2011 13:38:24 +0100
Geoff Leyland wrote:
> It took a while to work out how to stop LuaJIT optimising out
> the loops altogether - it might still be optimising more than I
> want. I'm sure this is not a good test, but for what it's
> worth:
Well, LuaJIT _is_ optimizing away all of the proxy overhead, of
course. :-)
But I was talking about Lua, not LuaJIT. And about hash keys, e.g.
strings. A pattern like this will show the worst case:
p.x = 1; p.x = 1; p.y = 1; p.z = 1; p.z = 1; p.z = 1; p.y = 1;
This is 40%-50% slower with table-based proxies vs. userdata
proxies. The actual cost is much higher -- it's shadowed by the
interpreter overhead.
--Mike
- References:
- newproxy, bug, joao lobato
- Re: newproxy, bug, Roberto Ierusalimschy
- Re: newproxy, bug, Javier Guerra Giraldez
- Re: newproxy, bug, Geoff Leyland
- Re: newproxy, bug, Mike Pall
- Re: newproxy, bug, Geoff Leyland