March 24, 2003 Re: Multimethods | ||||
---|---|---|---|---|
| ||||
Posted in reply to Craig Black | "Craig Black" <cblack@ara.com> wrote in message news:b5o0du$iar$1@digitaldaemon.com... > Hey peoples, > > I would like to thank Mark Evans for his numerous contributions to this mailing list. > > Multi-methods are great!! > > Implementation can be done in a number of ways. > > O(1) complexity can be achieved by indexing types and storing an N-Dimensional lookup table of function pointers. > > If the memory footprint for the N-Dimensional table gets to be too large, then you could store the function pointers in a binary tree. > why not compile the binary tree into a set of cmps and jmps ? |
March 31, 2003 Re: Multimethods | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wynn | > why not compile the binary tree into a set of cmps and jmps ?
Hmmm ..... sounds difficult to implement but a good idea!
Craig
|
March 31, 2003 Re: Multimethods | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wynn | I was just thinking, you could also use a hash table. Craig |
April 09, 2003 Re: Multimethods | ||||
---|---|---|---|---|
| ||||
Posted in reply to Craig Black | Craig Black wrote:
>>why not compile the binary tree into a set of cmps and jmps ?
>
> Hmmm ..... sounds difficult to implement but a good idea!
Why not optimise out all of the cmps and jmps altogether then. ;>
-i.
|
April 10, 2003 Re: Multimethods | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | There is no way to "optimize out" the logic in the binary tree. It must exist in some form. Somehow, the multi-method dispatcher is going to have to find the method that corresponds to the identity of the objects it is dealing with. This can be done in a number of ways, none of which vaporize into thin air when you optimize them. Craig "Ilya Minkov" <midiclub@8ung.at> wrote in message news:b726ev$1ea5$1@digitaldaemon.com... > Craig Black wrote: > >>why not compile the binary tree into a set of cmps and jmps ? > > > > Hmmm ..... sounds difficult to implement but a good idea! > > Why not optimise out all of the cmps and jmps altogether then. ;> > > -i. > |
Copyright © 1999-2021 by the D Language Foundation