[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Accessor performance
- To: Gregor J. Kiczales <gregor@parc.xerox.com>
- Subject: Accessor performance
- From: Trent Lange <lange@CS.UCLA.EDU>
- Date: Wed, 25 Apr 90 03:40:03 PDT
- Cc: CommonLoops.PA@Xerox.COM
- In-reply-to: Message of Tue, 17 Apr 90 20:07 PDT from "Gregor J. Kiczales <gregor@parc.xerox.com>" <19900418030711.2.GREGOR@SPIFF.parc.xerox.com>
- Redistributed: CommonLoops.PA
There is a major performance decrease in Rainy Day pcl for the standard
slot accessor methods when a standard method with the same name exists for
another class.
e.g.
(defclass a () ((param1 :accessor param1 :initform 'param1-default)))
(defclass b () ())
(defmethod param1 ((self b))
'b-param1-value)
I couldn't figure out the reason for it, but it seems pcl resorts to
calling slot-value-using-class (rather than the standard-reader-method?)
in these kinds of cases. This slows slot access down by a factor of 5.
On the other hand, the time to call a standard accessor method on an object
seems to be (basically) unaffected by whether other objects have the
same slot accessor name defined, and the time to call standard methods seems
(basically) unaffected by the number of same-named standard methods and
accessor methods. It therefore doesn't seem that the slowed standard
slot access is caused by added overhead on calculating method combination.
Is there some way that pcl could be changed to use the normal
standard-reader/writer-methods at all times, rather than using
slot-value-using-class when standard methods exists?
- Trent Lange