I am experimenting with a very simple optimization that replaces the
discriminating function of slot accessors based on the following criteria:

- The generic function should only contain methods of the type
standard-reader/writer-method
- The methods should be specialized on classes whose metaclass is
standard-class
- The optimization assumes that under those circumstances the user is not
allowed to extend the slot-value-using-class method (according to AMOP) and
thus the slot accessor can avoid calling slot-value.
- If all this applies, the discriminating function finds out the slot that
has to be read and its location (both are cached in a thread-local hash)
and reads/writes to the slot.

The preliminary figures cut down the execution time in FPRINT/PRETTY
(gabriel's benchmark) by 50%.

To the MOP experts here, does this all sound reasonable?

Juanjo

P.S.: My idea is also to add compute-discriminating-function generic
functions to ECL.

-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to