3 ms·
Those numbers a re bit small to get a full view of the way the pypy jit works: user=> (time (reduce1 + (range 100000))) Elapsed time: 903.011083603 msecs
by halgari 15y ago
Those numbers a re bit small to get a full view of the way the pypy jit works:
user=> (time (reduce1 + (range 100000)))
Elapsed time: 903.011083603 msecs
4999950000
user=> (time (reduce1 + (range 1000000)))
Elapsed time: 777.748823166 msecs
499999500000
user=> (time (reduce1 + (range 10000000)))
Elapsed time: 8764.57095146 msecs
49999995000000
user=>
Clojure via hotspot:
user=> (time (reduce + (range 100000)))
"Elapsed time: 174.768593 msecs"
4999950000
user=> (time (reduce + (range 1000000)))
"Elapsed time: 267.60421 msecs"
499999500000
user=> (time (reduce + (range 10000000)))
"Elapsed time: 1131.77367 msecs"
49999995000000
user=>
But yes, we still have some room for improvement.
- halgari 15y agoHere's a blog post explaining the issues involved in a bit more detail: http://clojure-py.blogspot.com/ http://clojure-py.blogspot.com/