←back to thread

138 points todsacerdoti | 3 comments | | HN request time: 2.208s | source
Show context
jinlisp ◴[] No.44379936[source]
When executing (time (loop for i below (expt 10 8) count t)) it takes a long time, sbcl takes less than a second on this. So not useful when speed is required. More: (time (loop for i below 1000000 count t) takes 7 seconds on my computer, so counting to (exp 10 8) would take 700 seconds, and sbcl do that in 0.1 seconds, so in this example the ratio is 7000 times slower than sbcl.
replies(2): >>44380005 #>>44385720 #
1. jackdaniel ◴[] No.44380005[source]
Bytecodes compiler used in this build from repl is one-pass with very little optimizations, so it is not surprising. Natively compiled code is much faster.
replies(1): >>44380050 #
2. jinlisp ◴[] No.44380050[source]
Should it be possible to implement an optimization compiler? so that compiling the code in the web page produces results similar to ECL or sbcl?
replies(1): >>44380085 #
3. jackdaniel ◴[] No.44380085[source]
With enough code - yes. But not right now. You may precompile to native though.