Thanks Ward! Its pretty cool you chose my library as first thing.

I have committed some changes to the float parser but I still can't beat 
typescript, but I did gain about 3.5ms of speed.
    
    
    name ............................... min time      avg time    std dv   runs
    parsing ........................... 36.510 ms     37.093 ms    ±0.913   x134
    
    
    Run

Though if this is a one shot script, you might consider disabling GC with 
--gc:none then it can beat type script:
    
    
    nim c -r -d:danger --gc:none .\tests\bench_options.nim
    
    
    Run
    
    
    name ............................... min time      avg time    std dv   runs
    parsing ........................... 23.764 ms     27.883 ms    ±9.115   x17
    
    
    Run

JS is GC and JIT is very fast for a dynamic language. My hope that nim's GC 
will improve, but there are still tricks to "cheat" and come out ahead. This is 
what irked me about javascript while making my browser based game, once you hit 
the JS performance wall you can't optimize any more. With nim there are things 
todo!

Reply via email to