[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua strings as "atoms"???
- From: Rici Lake <lua@...>
- Date: Tue, 17 May 2005 08:57:34 -0500
On 17-May-05, at 7:08 AM, Mike Pall wrote:
You'd need a new internal type value for that. And then special
case all equality comparisons.
Yes
And provide for some way to migrate
a stack string to a (unique) heap string (and back?).
No. It would just be an object, like a Number. You'd never have to
heapify it.
And I bet there are a few more pitfalls.
Possibly. But it might still be worth it.
I can think of only one use case: processing lots of short strings
in sequence (passing them back and forth to string.* functions).
Exactly. But that's not uncommon.
But as soon as you store a string in a table or index a table with it,
you pay the heap allocation overhead, anyway.
See above,
- References:
- C api changing values, mark joselli
- Re: C api changing values, Asko Kauppi
- Lua strings as "atoms"???, Chris Marrin
- Re: Lua strings as "atoms"???, Ben Sunshine-Hill
- Re: Lua strings as "atoms"???, Chris Marrin
- Re: Lua strings as "atoms"???, Rici Lake
- Re: Lua strings as "atoms"???, Chris Marrin
- Re: Lua strings as "atoms"???, Rici Lake
- Re: Lua strings as "atoms"???, Chris Marrin
- Re: Lua strings as "atoms"???, Rici Lake
- Re: Lua strings as "atoms"???, Mike Pall