Posts Tagged ‘antioptimisation’

You are doing it wrong…

21 August 2008

SimpleLisp is an interpreter, written in Java, for a limited dialect of LISP. I have been using it as an example Java program to evaluate my compiler optimisations. I just tried running a simple Lisp program (to calculate the Fibonacci sequence) in SimpleLisp to see the affect of my optimisations on the run time. Here are some results.

SimpleLisp compiled with jkit, without my optimisation stage:

$ time java org/simplelisp/interpreter/Interpreter examples/Fibonacci.sl
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393

real 0m3.380s
user 0m3.294s
sys 0m0.031s

SimpleLisp compiled with jkit, with my LICM optimisation stage:

$ time java org/simplelisp/interpreter/Interpreter examples/Fibonacci.sl
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393

real 0m4.289s
user 0m4.136s
sys 0m0.051s

Something is not quite right here…

Advertisements