[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Large number bytecode weirdness on different platforms
- From: Glenn Maynard <glenn@...>
- Date: Mon, 29 Jan 2007 21:30:04 -0500
On Mon, Jan 29, 2007 at 08:29:03PM -0500, Rici Lake wrote:
> Perhaps for the OP, but I personally think hex floats are a really
> useful interchange format, particularly now that compiled bytecode
> isn't.
That problem is annoying: I need both very fast bytecode loading, and
reasonably portable bytecode--that is, portable enough that I can build
bytecode for a target platform on an incompatible build platform, even
if it means reconfiguring Lua a bit. With embedded targets and cross-
compiling, doing build steps on the target platform is not reasonable.
Fortunately, the last time I had to do this, the only change I needed
was switching Lua to float.
I've thought about using Lua for cache, storing cached values in a table
and writing bytecode to disk. This would replace XML and other text
formats; binary chunk loading and table construction can be faster than
parsing text. I avoid binary cache because when something goes wrong,
it's hard to diagnose; I don't have anything but a binary blob. With
Lua chunks, I can load it into the commandline and examine the table it
outputs. Compatible bytecode would help this.
--
Glenn Maynard