"Eric Mahurin" <eric.mahurin / gmail.com> wrote in message 
news:29256ea00709040646n2052bc36ue64e0148331f0a77 / mail.gmail.com...

>  0.02  0.06   0.08    22    29  Mahurin::StringRope +
>  0.00  0.08   0.08    22    30  Mahurin::DenormalStringRope +
>  0.02  0.14   0.16    22    29  Mahurin::MutableStringRope
>  0.07  0.10   0.17   151   151  Munkby::ArrayRope
>  0.00  0.09   0.09    22    22  Munkby::ArrayRope (no dup)
>  0.01  0.12   0.13    22    22  Kalenkovich::Rope (fixed)
>

Eric, may I ask you to test one more thing: your #slice does not have any 
input checks. To make a fair comparison, could you please comment first 3 
lines of my #slice, making it:

  def slice(pos,len)
#1    return pos.match(self.to_s)[len] if pos.kind_of? Regexp
#2    pos = @length+pos if pos<0
#3    return nil if pos<0 || len<0 || pos>@length-1
    llen = @left.length
    return @left.slice(pos,len) if pos+len<=llen || ! @right
    return @right.slice(pos-llen, len) if pos>=llen
    Rope.new(@left.slice(pos,llen-pos),@right.slice(0,len+pos-llen))
  end

This code still satisfies your test, and I believe it will beat performance 
of yours (BTW, lines 2,3 show problems in your code)

Thank you,
-- EK