[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Making luaconf.h settings available in Lua
- From: Kevin Vermeer <reemrevnivek@...>
- Date: Mon, 28 Feb 2011 14:34:30 -0500
On Mon, Feb 28, 2011 at 12:31 PM, Roberto Ierusalimschy <firstname.lastname@example.org>
Actually it is more like 500 bytes, if I did the math right (not
> Reuben Thomas <email@example.com
> >> It's in 5.1 as well. Just not documented.
> > Wow.
> > No prizes for the weird format, though. What's wrong with a table?
> This way probably saves a good 20-30 bytes of memory... :]
counting the extra C code to create the table). Given that very few
people use package.config, and those that use probably only need its
first character, it does not look that cheap to me.
Thanks for sweating these details. I understand that many of your users may never go outside of the infinite memory model popular in desktop programming, but some of us embedded programmers are trying to use Lua with 64kB or less of RAM, so those 500 bytes make a big difference!
I do have to make some modifications to fit in my constrained environment, but these sensible valuations are much appreciated. I won't be closed-minded and advocate saving memory at the expense of speed or legibility everywhere, but I appreciate that you take the time to make sensible trade-offs like this one.