Please pardon my optimizing ignorance.  I have recently been rewriting
a Fortran program in Common Lisp.  For all its ghastly spaghetti-ness
and incomprehensibility, the Fortran program is quite fast (using g77
-O6), about 4 seconds for the test case on a 500MHz P3.  My CL
version, compiled, takes about 36 seconds for the same test case (and
that is after an algorithmic optimization that saves about a factor of
2).

The program is a "floating random-walk" in 3D space.  My test case has
125 surfaces and 1000 walks of a nondeterministic number of steps in
each walk.

  (compile-file "test.lisp")
  (load "test")
  (load "surfaces.lisp")
  (time (n-random-walks surfaces (make-3vec 0.0d0 5.5d0 64.0d0) 1000 (* 0.002 1/12)))

My CL performance penalty is around 14x right now.  I'd like to get it
down closer to 2x or 3x if possible.

I am using the Debian CMUCL:

  USER> (lisp-implementation-version)
  "CVS release-18e-branch + minimal debian patches"

Can anyone give some hints about how to make this faster?  

  <http://www.aracnet.com/~seniorr/test.lisp>
  <http://www.aracnet.com/~seniorr/surfaces.lisp>


-- 
Russell Senior         ``I have nine fingers; you have ten.''
[EMAIL PROTECTED]

Reply via email to