Skip to content
Dominik Burgdörfer edited this page Jun 7, 2011 · 5 revisions

Performance Tests

Fibonacci (27 - Elements, Recursion)

(defun fibonacci (n)
  (if (or (equal n 0) (equal n 1))
      1
    (+ (fibonacci (- n 2)) (fibonacci (- n 1)))))

(defun printer (x)
  (if (equal x 0)
      (print (fibonacci x))
    (print (fibonacci x))
  (printer (- x 1))))

(printer 27)

Lisp-Interaction

Replace dynamic casts with C-casts

[dominik@mobile-domachine build]$ time src/lisp-test fibonacci.l
...

real	0m30.096s
user	0m30.021s
sys	0m0.010s
[dominik@mobile-domachine build]$ time src/lisp-test fibonacci.l
...

real	1m11.711s
user	1m11.559s
sys	0m0.000s
[dominik@mobile-domachine build]$ time src/lisp-test fibonacci.l
...

real	1m12.883s
user	1m12.719s
sys	0m0.007s

cxx-function issue

Test No. Without cxx-function With cxx-function
1 real 1m17.913s real 1m19.948s
user 1m17.715s user 1m19.751s
sys 0m0.033s sys 0m0.020s
2 real 1m18.313s real 1m20.040s
user 1m18.102s user 1m19.861s
sys 0m0.047s sys 0m0.013s
3 real 1m18.035s real 1m20.449s
user 1m17.855s user 1m20.248s
sys 0m0.017s sys 0m0.030s

Emacs

Test No. -
1 real 0m2.188s
user 0m2.167s
sys 0m0.013s
2 real 0m2.239s
user 0m2.217s
sys 0m0.017s
3 real 0m2.205s
user 0m2.190s
sys 0m0.010s