[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade)
- From: Javier Guerra Giraldez <javier@...>
- Date: Thu, 27 Mar 2014 14:34:59 -0500
On Thu, Mar 27, 2014 at 1:57 PM, Coroutines <coroutines@gmail.com> wrote:
> I believe std::string's in C++ allocate in the same way, also
> std::vector's. The Tower of Hanoi concatenating thing is useful for
> keeping memory down to the sqrt() of the n-many strings you will have
> to concatenate (iirc).
AFAIR, the PiL contatenation algorithm was intended to reduce the
number of string internings, not allocations. once you do it in C,
you don't have to intern anything until the end. in the
table.concat() case, it's possible to allocate just once, since the
final size is easily knowable.
--
Javier
- References:
- Re: [ANN] Lua 5.3.0 (work2) now available, Andrew Starks
- Re: [ANN] Lua 5.3.0 (work2) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), katlogic
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Roberto Ierusalimschy
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Hisham
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Rena
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), William Ahern
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Andrew Starks
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Dirk Laurie
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Oliver Kroth
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Oliver Kroth
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Tim Hill
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Peter Melnichenko
- Re: [ANN] Lua 5.3.0 (work2) now available (number coercion holy crusade), Coroutines