[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compile-flavor-methods for CLOS
I'd also like to comment on CLOS. A while back someone (I think Moon) made
a claim on SLUG that there was no need for an analog to :ORDERED-INSTANCE-VARIABLES
in CLOS because experience with Flavors showed that while once upon a time
that option created a significant improvement in performance, recent enhancements
to Flavors made the normal case much more efficient so that the performance
difference was reduced. THAT IS SIMPLY NOT TRUE. I recently took a 5000 line
program which I am currently writing (which has 19 DEFFLAVOR forms) and changed
3 of them to use ordered instance variables (for a total of 28 instance variables
which were ordered) and my program runs 50% faster. It is an animation program
whose performance improved from 18 frames per second to 27 frames per second.
So the relative cost of normal instance variable access to ordered instance
variable access must still be very high to account for the 50% improvement
over the entire mix of instructions my program is executing which has only a
small percentage of instance variable access. This change required adding only
17 lines to my program. For this reason alone I think I could not switch to CLOS
unless CLOS provided some equivalent mechanism.
Furthermore, currently CLOS compiles methods at run time. Flavors
COMPILE-FLAVOR-METHODS compiles methods at compile time, incurring neither
load time nor run time overhead. The bogus solution previously presented
for CLOS compiles methods at load time. File loading on Symbolics is already
painfully slow (much slower than on Lucid). Method compilation should be
done at compile time, not at load time or run time. I can't see *ANY* advantages
to doing it at load time or run time. Personally, when I use flavors, all
of my flavors have associated COMPILE-FLAVOR-METHODS.
Jeff