tag:blogger.com,1999:blog-4334522554803190021.post324938598755394301..comments2009-09-01T01:01:51.275-07:00Comments on On Code: Closures + Lambda Sean Rosshttp://www.blogger.com/profile/07630823416408764714noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-4334522554803190021.post-80306651716482626932007-07-23T03:06:00.000-07:002007-07-23T03:06:00.000-07:00Indeed. I asked for some evidence of CLOS not bein...Indeed. I asked for some evidence of CLOS not being slow on c.l.l and the only response was an article from many years ago saying that CLOS had gotten faster.<BR/><BR/>From the benchmarks I've seen, CLOS is extremely slow.Jon Harrophttps://www.blogger.com/profile/11059316496121100950noreply@blogger.comtag:blogger.com,1999:blog-4334522554803190021.post-57362956501165190962007-07-22T03:27:00.000-07:002007-07-22T03:27:00.000-07:00BTW -- I made the tests because I was considering ...BTW -- I made the tests because I was considering switching from C++ to Lisp. In C++, I do acess objects directly inside loops (and this is number crunching, it *needs* to be fast). In Lisp I have to extract arrays from inside the object, and then traverse them if I want the code to be fast.greenhttps://www.blogger.com/profile/06644725010715337460noreply@blogger.comtag:blogger.com,1999:blog-4334522554803190021.post-12091847562186971462007-07-22T03:24:00.000-07:002007-07-22T03:24:00.000-07:00About the "CLOS is slow" issue -- you mention that...About the "CLOS is slow" issue -- you mention that "this myth has been debunked", so I'd like to know the source. Please don't make claims about performance without citing any experiments.<BR/>At least the implementations I use (CMUCL, Clisp and SBCL) are not very fast when accessing CLOS objects. What I did was to access objects, structures and arrays repeatedly in a simple test. CLOS was very slow.<BR/><BR/>Try to write some benchmark code comparing access to instances of CLOS objects, aceess to structures and access to plain arrays. Also, try to use plain functions, generic functions and methods on all structures. On different Lisp implementations. Then post the times.<BR/><BR/>In my opinion, it would be good for Lisp and for the Lisp community if any problems (for example, CLOS slowness) were made clear, so we an do something about them (for example, if everybody concluded that CLOS is inherently slow because of its flexibility, then someone could come up with a lightweight alternative).greenhttps://www.blogger.com/profile/06644725010715337460noreply@blogger.com