On Sat, May 18, 2002 at 07:33:53PM -0400, Dan Sugalski wrote:
> At 7:25 PM -0400 5/18/02, Melvin Smith wrote:
> >Yeh I know that word is yucky and from Java land, but in this case, 
> >I think that
> >"system" PMCs should take liberties for optimization.
> 
> *All* PMCs should take liberties for optimization. PMC vtable entries 
> are the only things that should know the internal structures, and 
> they're allowed--heck, encouraged--to take any liberties needed for 
> speed.
> 
> I don't much care if it breaks inheritance at the PMC level. Too bad. 
> The speed's more important here.

Is there any understandable and maintainable way that we can use the same
(base) code to generate two sets of core PMCs - one set that have all the
"cheating" optimisations, and another set (or set of code) that is
internally clean and can be inherited from?

That way we could have the benefit of speed for the common case, but also
let people derive from them easily.

In theory, all it would need to be would be two sets of vtables, wouldn't it?
One "clean" vtable that implements all calls back in via the vtable, and
one "grubby" vtable that cheats. (the "final class" version).

Nicholas Clark
-- 
Even better than the real thing:        http://nms-cgi.sourceforge.net/

Reply via email to