Subject: [Fwd: Java versus Lisp. Comparison needed.]
From: Richard Fateman
Date: Sat, 16 May 2009 22:00:05 -0700
-------- Original Message --------
Subject: Java versus Lisp. Comparison needed.
Date: Sat, 16 May 2009 14:58:34 -0700 (PDT)
From: comp.lang.scheme <phi500ac at yahoo.ca>
Organization: http://groups.google.com
Newsgroups: comp.lang.lisp
I work for a group of scientists that study global warming. I am not a
scientist myself. I am a student who was hired to test programs and
install CO2 sensors. Most programs are in Common Lisp. Dr. Magda
Lombardo has chosen Common Lisp because she compared the performance
of SBCL with Java, and concluded that SBCL is faster. Dr. Lombardo is
not a programmer herself. In fact, she cannot tell a C program from a
Matlab program. Therefore I am in charge of porting computer
applications to her Windows XP system.
Dr. Martins is a scientist who works with lightning and protection of
electrical appliances against atmospheric discharges. His programmers
come from different backgrounds, and write lightning propagation
models in many computer languages. Dr. Lombardo used Dr. Martins
programs as benchmarks, because she believes that we will face similar
problems. The Common Lisp model uses Maxima for Computer algebra
operations, Matlisp for number crunching, and a genetic programming
system designed by Dr. Martins himself.
Since Dr. Lobardo works on Windows, and does not have CMUCL, I ported
Dr. Martins' Lisp programs to SBCL. I compiled Maxima from
instructions given in the INSTALL.lisp file. BTW, one must change a
line in displa.lisp in order to make Maxima work on Windows:
#-(or gcl clisp sbcl) (cond ((not (interactive-stream-p *standard-
input*)) (fresh-line)))
After that change, it compiles flawlessly. If there is a member of the
Maxima team reading this article, I suggest that s/he fixes the above
line in the distribution package.
The genetic programming algorithm adds capacitors, coils and resistors
to the model until it matches examples generated by a computer algebra
package. The Java program turns out to be much slower than the Lisp
program. I was expecting it to be faster. To be precise, SBCL was 26
times faster than Java (SBCL: 16 minutes; Java: 7 hours). Since Dr.
Lombardo has chosen SBCL based solely on its dealing with Dr. Martins'
problem, I wonder why her results were so different from the Computer
Language Benchmarks Game, and from what I have read in the literature.
I suppose that people who wrote the Java program made a very stupid
blunder. My questions: Does any one in this list have experience in GP
in Java and SBCL? Are Dr. Lombardo compatible with results in the
literature?
BTW, I also ported Dr. Martins's programs to GCL, and discovered that
GCL takes as long as Java to run them. How do you people explain these
results?
I know that it is hard to give an answer to my questions without
seeing the programs. Unhappily, Dr. Martins is very jealous of his
programs, and I am afraid that he will not allow me to post them.