Hi LISP gurus
Was playing with Lisp on my WinXP and was wondering why this large difference of performance.
I got GNU Emacs and CLISP on my WinXP laptop. I run these following codes respectively:
For emacs, the result is 10 seconds if using interpreter, then 3 seconds if using byte-code.
But for CLISP interpreter, it’s a horrible 48 seconds, I was wondering what’s the difference? And why such a large gap? Maybe CLISP VM is stack-based while emacs is something maybe register-based?
Thanks in advance, ciao!
Was playing with Lisp on my WinXP and was wondering why this large difference of performance.
I got GNU Emacs and CLISP on my WinXP laptop. I run these following codes respectively:
Code:
(defun silly-loop (n)
"Return the time, in seconds, to run N iterations of a loop."
(let ((t1 (float-time)))
(while (> (setq n (1- n)) 0))
(- (float-time) t1)))
"Return the time, in seconds, to run N iterations of a loop."
(let ((t1 (float-time)))
(while (> (setq n (1- n)) 0))
(- (float-time) t1)))
Code:
(defun silly-loop (n)
"Return the time, in seconds, to run N iterations of a loop."
(let ((t1 (get-universal-time)))
(loop while (> (setq n (1- n)) 0))
(- (get-universal-time) t1)))
"Return the time, in seconds, to run N iterations of a loop."
(let ((t1 (get-universal-time)))
(loop while (> (setq n (1- n)) 0))
(- (get-universal-time) t1)))
For emacs, the result is 10 seconds if using interpreter, then 3 seconds if using byte-code.
But for CLISP interpreter, it’s a horrible 48 seconds, I was wondering what’s the difference? And why such a large gap? Maybe CLISP VM is stack-based while emacs is something maybe register-based?
Thanks in advance, ciao!
_________________
(Sakura) (Sasuke) (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein