Ropes vs Strings performance

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Ropes vs Strings performance

Hannes Hirzel
Hello Ken

I added two performance tests to your Cuis-Ropes implementation
https://github.com/KenDickey/Cuis-Ropes

1) concat

a)
concat time for Ropes: 299ms
concat time for Strings: 557ms

b)
concat time for Ropes: 30ms
concat time for Strings: 184ms


2) interation
  Rope time for #do: loop: 73ms
  String time for #do: loop: 70ms


This so far confirms what is given as the aim of the Ropes implementation

       "Ropes are a high-level representation of text
        that offers much better performance than strings
        for common operations,
        and generally reduce memory allocations and copies,
        while only entailing a small degradation of less common operations"


Kind regards
Hannes

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Ropes vs Strings performance

Juan Vuletich-4
Hi Hannes,

This is indeed interesting.

Something that would be nice to know is what are the operations we need
to be fast when editing multi-Mb text (with attributes)...

Cheers,
Juan Vuletich

On 2/18/2013 6:55 AM, H. Hirzel wrote:

> Hello Ken
>
> I added two performance tests to your Cuis-Ropes implementation
> https://github.com/KenDickey/Cuis-Ropes
>
> 1) concat
>
> a)
> concat time for Ropes: 299ms
> concat time for Strings: 557ms
>
> b)
> concat time for Ropes: 30ms
> concat time for Strings: 184ms
>
>
> 2) interation
>    Rope time for #do: loop: 73ms
>    String time for #do: loop: 70ms
>
>
> This so far confirms what is given as the aim of the Ropes implementation
>
>         "Ropes are a high-level representation of text
>          that offers much better performance than strings
>          for common operations,
>          and generally reduce memory allocations and copies,
>          while only entailing a small degradation of less common operations"
>
>
> Kind regards
> Hannes
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org