[Openmcl-devel] Lisp versus JavaScript (was: list - vector)

Andrew Shalit alms at clozure.com
Mon May 18 20:51:23 PDT 2009


On May 18, 2009, at 10:08 PM, Gary Byers wrote:

> If you're starting from the assumption that #'CL:AREF (without any
> compile-time assertions) is somehow analogous (performance-wise or
> otherwise) to an array-reference operator in a language with one array
> type, you probably won't get very far very fast; that's simply not
> a reasonable assumption.  In my mind, this is the sort of thing that
> every serious CL programmer should know (though I admit to not being
> entirely clear on how this knowledge is to be acquired; I imagine that
> most of what's written about it tends to be excruciatingly  
> implementation-
> dependent.)   I don't think that anyone who's programmed in CL thinks
> that #'CL:+ is directly analogous to C's addition operator (on  
> explicitly
> typed operands), and CL programmers somehow learn that declaring the
> types of CL:+'s operands (and in some cases the type of the result)  
> can
> greatly improve performance (especially when the type in question is
> FIXNUM.)
>
> If people honestly don't realize that there are similar issues with  
> AREF,
> that's certainly surprising.

That brings us to the class line: "Lisp programmers know the value of  
everything and the cost of nothing."

Perhaps we could add, Lisp implementors know the cost of everything,  
but Lisp documenters haven't been able to make that sufficiently  
obvious to other Lisp programmers.  But every little bit helps.



More information about the Openmcl-devel mailing list