Re: Best multimethods/multiple dispatch implementations?

Scott Burson <FSet.SLB@gmail.com>
Fri, 5 Sep 2008 16:48:41 -0700 (PDT)

          From comp.compilers

Related articles
Best multimethods/multiple dispatch implementations? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2008-09-05)
Re: Best multimethods/multiple dispatch implementations? FSet.SLB@gmail.com (Scott Burson) (2008-09-05)
Re: Best multimethods/multiple dispatch implementations? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2008-09-06)
Re: Best multimethods/multiple dispatch implementations? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2008-09-08)
Re: Best multimethods/multiple dispatch implementations? sh006d3592@blueyonder.co.uk (Steve Horne) (2008-09-09)
Re: Best multimethods/multiple dispatch implementations? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2008-09-15)
Re: Best multimethods/multiple dispatch implementations? gneuner2@comcast.net (George Neuner) (2008-09-15)
Re: Best multimethods/multiple dispatch implementations? sh006d3592@blueyonder.co.uk (Stephen Horne) (2008-09-17)
[14 later articles]
| List of all articles for this month |
From: Scott Burson <FSet.SLB@gmail.com>
Newsgroups: comp.compilers
Date: Fri, 5 Sep 2008 16:48:41 -0700 (PDT)
Organization: Compilers Central
References: 08-09-026
Keywords: OOP, performance
Posted-Date: 07 Sep 2008 17:25:01 EDT

On Sep 5, 1:20 pm, Christoffer Lernv <le...@dragonascendant.com>
wrote:
> I have been looking a bit at multiple dispatch.
>
> I know Dylan and CLOS also has implementations, but I heard CLOS'
> might be pretty slow.


CLOS dispatch is actually remarkably fast when well implemented. I
have tried replacing, in an inner loop, a generic function call (a
CLOS dispatch) with an ordinary function call, and got a much smaller
speedup than I expected. This was in an implementation (Franz
Allegro) with a well-optimized CLOS, but still I was pleasantly
surprised, particularly considering that the generic function in
question had a couple dozen methods.


I think anyone studying multiple dispatch -- particularly the
semantics, but also the implementation -- needs to look at CLOS very
carefully.


-- Scott



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.