lua-users home
lua-l archive

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


On Wednesday, June 03, 2015 12:07:21 PM Roberto Ierusalimschy wrote:
> > repeatedly interning strings like "ready", "cancel", or so can be a
> > significant overhead; but from Lua all these are already interned.  in
> > some cases, i've resorted to put those string in the registry, so i
> > can use lua_rawgeti() to get the string instead of simply pushing it.
> 
> Yes, we hope the cache can improve this.

I had a random thought recently about the possibility of storing single 
character strings entirely in a TValue. Or up to 3/7 characters depending on 
word size. On the other hand, you've got yet another value type. And what 
happens to the C pointer to the string when the value is moved around the 
stack?

As to the version string, I for one do not worship at the altar of Semantic 
Versioning which I believe makes the false assumption that a "mere" bug fix is 
a non-breaking change. Any change, no matter how small, has the potential to 
break something and assuming your code will act the same when the minor number 
changes is no excuse for complacency. 

-- 
tom <telliamed@whoopdedo.org>