[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Patch to use colored NaNs on LP64
- From: Florian Weimer <fw@...>
- Date: Mon, 01 Jun 2009 10:11:11 +0200
* Mike Pall:
> Florian Weimer wrote:
>> Here's an experimental patch to shrink the size of a Lua value to 64
>> bit on LP64 architectures, by encoding non-double values as special
>> NaNs. I think this was initially suggested by Mike Pall, but I'm not
>> sure if it's been implemented yet.
>
> Yes, it will be in LuaJIT 2.x. But as I've mentioned in the past
> it doesn't pay off for the Lua interpreter:
>
> http://lua-users.org/lists/lua-l/2008-02/msg00093.html
>
> Apart from the portability problem (the popular targets are ILP32,
> LP64 and LLP64) your patch is lacking the important tricks to make
> it fast. I've disclosed a couple of them in a bug report for Tamarin:
I guess most of the speed-up comes from improved locality due to
smaller object size anyway. I can't use the 32/32 split because I
need 48 bits for pointers, and as a side-effect, I bypass the store
forwarding issues (I think, at the very least I always store and load
64 bit quantities).
Do you see a larger speed-up than 10% (with heap-intense loads)?