Comment

Comment by unhammer

    $ time wc big-data.csv                                                                     
     1252045  1252045 17805309 big-data.csv
    
    real    0m0.417s
    user    0m0.411s
    sys     0m0.004s

    $ time ./sum-ocaml big-data.csv                                                            
    6143290.,13087196.,14473656.,50128757.,3765822.,1290420.
    
    real    0m3.680s
    user    0m3.666s
    sys     0m0.008s


    $ time python3 sum.py big-data.csv          
    6143290.0,13087196.0,14473656.0,50128757.0,3765822.0,1290420.0
    
    real    0m7.186s
    user    0m7.131s
    sys     0m0.036s

    $ time python2 sum.py big-data.csv         
    6143290.0,13087196.0,14473656.0,50128757.0,3765822.0,1290420.0
    
    real    0m5.146s
    user    0m5.111s
    sys     0m0.012s

    $ time pypy2 sum.py big-data.csv            
    6143290.0,13087196.0,14473656.0,50128757.0,3765822.0,1290420.0
    
    real    0m2.754s
    user    0m2.697s
    sys     0m0.052s
I really like ocaml, but have to admit, pypy is pretty amazing.
parent unhammer 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton