[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lisp performance was Re: problems with lisp



I think we're stretching Russ' email a bit too far at this point.  I don't believe you need a fundamental rewrite in Lisp any more often then you do in another language.

Generally, write your Lisp (or any other language really) in a clear straight forward manner.  When you have a performance problem, use a profiler to find out where it is.  Don't guess, not even if you're an expert.  The 80/20 rule means you have to address performance, but most of the code can ignore it.

There are many potential source of performance problems, as there are in any language.  There are even garden paths that will lead you to them if you are not careful, such as using lists for everything.  Lisp will cons an object, such as a float, or a long as in Russ' case, when it has no type information to go on, and this can be a suprise.  Type declarations can help a lot in such cases.
Don't get me wrong.  Lisp is fine for numerical computing.

At 12:03 PM 9/1/2003 -0700, Peter Seibel wrote:
>Do you have a more practical example. Something where the real
>"simple" version was not only too slow, but couldn't in fact be made
>effecient without fundamentally rewriting it? I'm sincerely curious
>because I've been thinking about this problem lately but don't have
>enough real-world Common Lisp experience under my belt to have a lot
>of good examples, one way or the other.