lua-users home
lua-l archive

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


Quoth Mike Pall <mikelu-1011@mike.de>, on 2010-11-18 11:40:38 +0100:
> [Case in point: 2 of the 3 leading open source JavaScript engines
> have now switched to the 8 byte NaN-tagging value model that's
> used by LuaJIT. Esp. Mozilla made extensive measurements before
> going for such a major change of their code base. Having a compact
> value representation pays off big time for dynamic languages.]

Incidentally, SuperCollider was using something similar a long time
ago, and I wouldn't be surprised if other runtimes did something
similar.  It also made SuperCollider break horribly if you tried to
compile it on a platform with 64-bit pointers.  LuaJIT doesn't seem to
have those constraints as intensely; I gather it does enough magic to
ensure that it can safely use essentially 32-bit pointers most of the
time, and lightuserdata on 64-bit-pointer platforms only use the top
16 bits as a tag (if I'm reading lj_obj.h correctly), leaving at least
48 bits of address, which is what you get anyway on current-day AMD64,
which is possibly the most popular platform with a 64-bit address
space.

> --Mike

   ---> Drake Wilson