lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2011/2/23 Yura Sokolov <funny.falcon@gmail.com>:
> I just made patch for NaN packing of TValue on x86 machines (as in luajit2).
>
> http://lua-users.org/files/wiki_insecure/power_patches/5.1/pack_value.patch
>
> For my test script memory consumption reduced from 28Mb to 21Mb
> and perfomance improved by 3.5-5%.
>
> (github branch https://github.com/funny-falcon/lua/tree/pack_value )

I spent a while trying to figure out how it would work on 64-bit
before I reread your email and saw that it was x86 only ;)

This makes me wonder, how does luajit do it on 64-bit? I can
understand that in terms of supply, much less than 64 bits is
sufficient, but how do you store pointers that happen not to lie in
the available range? mmap'd storage in particular gives back pointers
that are clearly uncontiguous with the rest of your allocated memory.

    henk