I added the branch 'prefix' in my cowstrings library. For a simple sorting 
[benchmark](https://github.com/planetis-m/cowstrings/blob/prefix/tests/bcowstrings3.nim)
 I get 0.1704 ms (prefix String) vs 0.1944 ms (std.string) average time for 
sorting a seq of a thousand objects. For now I don't have a solution for 
l-value modifier since there's no way to update prefix.
    
    
    proc `[]`*(x: var String; i: int): var char {.inline.} =
      checkBounds(i, x.len)
      result = x.p.data[i]
      # if i < 4:
      #   x.prefix[i] = val??
    
    
    Run

Reply via email to