[Cuis] Ropes vs Strings performance

Juan Vuletich juan at jvuletich.org
Fri Feb 22 12:51:36 CST 2013


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
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>





More information about the Cuis mailing list