|
|
||
|
On 22/05/2020 02:23, Andrea wrote:
(this copied from one of my previous email on lstring.c)
I had a look at an old post by Mike Pall: http://lua
-users.org/wiki/FastStringPatch
question is: it makes a lot of sense to manage *very short strings *as Lua
manages doubles/int64
Why this solution has been discarded for recent versions of Lua?
(source and executable grow of course but benchmarks done in 2007 seems to
show an advantage)
Andrea
Just guessing from past discussions on lua-l: it wasn't implemented
because Lua team don't implement any feasible optimization technique,
but only those that don't clutter the code.
Although Lua compiler is quite fast, it could be improved in many areas, but that would render the code less amenable to future /structural/ improvements and would make it bigger in size.
And implementation compactness /is/ a goal for Lua (whereas ultimate performance is not), since it is intended to be embedded. IIRC, Lua team "vision" is that if you want the ultimate speed, then you should use C. That's what the C API is for.
-- Lorenzo