[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.1 (work1) now available
- From: Josh Haberman <jhaberman@...>
- Date: Fri, 23 Mar 2012 11:16:51 -0700
On Fri, Mar 23, 2012 at 10:08 AM, Mike Pall <mikelu-1203@mike.de> wrote:
> Ropes are a good idea on paper, but they increase complexity and
> rarely pay off outside targeted benchmarks and textbook examples.
I think this is too strong of a statement. We use ropes extensively
at Google (we call them "cords") and frequently see very real gains.
I agree though that they're not a good choice for the generic string
type in a language like Lua.
It seems that ropes could be implemented as a userdata in Lua. The
userdata's uservalue could reference the underlying string objects.
Josh