3 ms·
I understand, i too had the same apprehension about clojure/JVM before i used it. Though the startup time of clojure was slow, Java is anything but slow. The st
by pankajdoharey 8y ago
I understand, i too had the same apprehension about clojure/JVM before i used it. Though the startup time of clojure was slow, Java is anything but slow. The startup tie has improved quite a low in clojure the past few months, but leiningen is still a pain to use.
> TLDR: Java is very fast, Clojure uses JVM in ways which are inherently slow on that VM.
JVM is really not the best platform for hosting either dynamic languages or functional ones.
Heres the time taken by csi, clojure , racket , sbcl.
>> time csi -e "(exit)"
real 0m0.088s
user 0m0.020s
sys 0m0.027s
>> time clj -e "(System/exit 0)"
real 0m1.944s
user 0m3.272s
sys 0m0.253s
>> time racket -e "(exit)"
real 0m1.100s
user 0m0.503s
sys 0m0.296s
>> time sbcl --eval "(exit)"
real 0m0.060s
user 0m0.023s
sys 0m0.025s
>> time newlisp -e "(exit)"
real 0m0.089s
user 0m0.011s
sys 0m0.033s
Clojure is the slowest in this.