this post was submitted on 21 Oct 2023
1 points (100.0% liked)

Lisp

52 readers
3 users here now

founded 1 year ago
MODERATORS
 

sbcl-lisp : 0.7s

racket-scheme : 0.7s

ccl-lisp : 6s

kawa-scheme : 14s

abcl-lisp : 45s

you are viewing a single comment's thread
view the rest of the comments
[โ€“] ventuspilot@alien.top 1 points 11 months ago (1 children)

At least with abcl you may want to consider using the builtin compiler for a considerable speedup, don't know about the others:

C:\>abcl
CL-USER(1): (defun fib (x) (if (< x 2) 1 (+ (fib (- x 2)) (fib (- x 1)))))
FIB
CL-USER(2): (time (fib 39))
86.97 seconds real time
0 cons cells
102334155
CL-USER(3): (compile 'fib)
FIB
NIL
NIL
CL-USER(4): (time (fib 39))
8.958 seconds real time
0 cons cells
102334155
CL-USER(5):
[โ€“] Ok_Specific_7749@alien.top 1 points 11 months ago

Indeed using compile the time reduced to 6s.
So one has to be careful before drawing conclusions.