Author: Tord Romstad
Date: 02:24:27 01/24/04
Go up one level in this thread
On January 23, 2004 at 14:24:53, Anthony Cozzie wrote: >I personally prefer ML, but there is really no question that functional >languages are way easier to write code in. ML is quite nice. I also have a weak spot for Haskell. But Lisp is not really a functional programming language, though it is often described as such. It supports functional programming, but FP is neither the only nor the most popular programming style in the Lisp community. Most large-scale industrial Lisp applications are written in a highly object-oriented style. >OTOH, well written C is probably twice as fast as anything but well written >assembly. It's not quite that simple, in my experience. I am not sufficiently familiar with ML to say much about its performance, but this is my view about Lisp compared to C in this respect: In Lisp, it is relatively easy to write 100% correct and bug-free programs, but relatively difficult to make the code very fast. In C, the situation is precisely the opposite. It *is* possible to make Lisp code extremely fast, usually comparable to the speed of C code. However, this requires a lot of knowledge not only of the Lisp programming language, but also of the internals of the Lisp implementation you are using. This also has the disadvantage that it is very difficult to write portable fast programs in Lisp. By the way, the compiler in CMU Common Lisp has a feature I really wish were in gcc as well: When compiling with maximal optimization, the compiler prints lots of comments, hints and warnings about what parts of the code it failed to optimize and why. This is extremely helpful when trying to optimize the program >But give the compiler guys another 10 years or so . . . . Perhaps. It will be interesting to see. Part of the reason why the C compilers are the best right now is of course that much more effort has been spent on them than on compilers for other languages. If this continues to be the case for the next 10 years, I'm not sure any of the other languages will catch up. Tord
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.