Re: the necessity of Lisp's Objects?
- From: vanekl <vanek@xxxxxxx>
- Date: Fri, 25 Jan 2008 23:53:59 +0000
Jon Harrop wrote:
[snip]
In the context of compilation, Mathematica is basically in the same boat as
Lisp. If you want to run general purpose code efficiently then you've got a
real uphill struggle on your hands. There are some gallant attempts for
Lisp, like SBCL, but they will never compete with statically typed
languages because acquiring the information the compiler needs in order to
optimize the code completely erodes useful features like dynamic linking,
separate compilation and so forth. Furthermore, I find static typing an
essential tool for writing non-trivial programs correctly.
These over-generalizations used to apply. Now, not so much.
Whenever I had a really sticky problem, I would first work out the algorithm
in Lisp and then port it to C/C++ so I could get that last bit of
efficiency that was sometimes required. This technique served me well until two
weeks ago. To my astonishment, the SBCL version ran faster than the C++ -O3 executable.
The most impressive thing was, I wasn't even trying to optimize the
Lisp code (there were zero type declarations), yet the Lisp code consistently outran
the C++/STL code by a significant margin on the same machine. (I/O did not play a
major role.) This type of behavior may not happen every time for every program, but
it's certainly evident to me that CL is no longer sitting at the children's table.
My congratulations to the SBCL team. Even if this just means that C++/STL is getting
bloated more than that CL is getting faster, in either event, it was an eye opener
and very much appreciated.
L. Vanek
.
- Prev by Date: Re: Formatting large numbers with ~g?
- Next by Date: Re: Lisp pattern matching libraries & difference between unification and pattern matching
- Previous by thread: Re: the necessity of Lisp's Objects?
- Next by thread: Re: the necessity of Lisp's Objects?
- Index(es):
Relevant Pages
|