[Cuis] Ropes vs Strings performance

H. Hirzel hannes.hirzel at gmail.com
Mon Feb 18 03:55:34 CST 2013


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




More information about the Cuis mailing list