I also usually find Py2 much faster than Py3. Pypy usually helps. Cython more 
so, but with much more work.

Anyway, the obvious better way to do it in Nim (which I always assumed was 
"never the point") is 
    
    
    var s = newStringOfCap(100_000_001) # or whatever
    for i in 0..100_000_000: s.add('x')
    echo len(s)
    
    
    Run

which runs 2x as fast as otherwise and uses exactly the right amount of memory. 
I mention it just in case @HashBackupJim was unaware.

Reply via email to