lua-users home
lua-l archive

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


Joshua Jensen wrote:
> Additionally, fragmentation of memory will be kept at a minimum  
> as parsers almost always need scratch space.  The Lua parser does, 
> anyway.

I've recently made some major changes to the parser that mostly
eliminate fragmentation. It uses temporary, shared, growable
structures which are later copied into compact prototype objects.
All data of a prototype is colocated in memory, too. It's a single
blob, not the 8 blobs that Lua needs per prototype.

If I ever get around to it, I could additionally compress the
debug info to 1/5th of its current size.

> It works for code, too.  I just tested running luac on a 15k .lua ASCII  
> script.  It ended up being 7k in binary form.

Someone on the list did a comparison some time ago. AFAIR the gist
of it was that you'd certainly want to compress either one, if you
really want to save disk space. And source code compresses much
better, eating up any savings from the use of a binary format.

--Mike