[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compilation of methods per class.
- To: lange@CS.UCLA.EDU
- Subject: Compilation of methods per class.
- From: Jon L White <jonl@lucid.COM>
- Date: Wed, 26 Sep 1990 10:18:26 PDT
- Cc: firstname.lastname@example.org, commonloops.PARC@xerox.com
- In-reply-to: "Trent Lange's message of Wed, 26 Sep 1990 06:17:12 PDT <email@example.com>"
re: I couldn't illustrate any significant differences in run times with
this test file in Franz, though I do get them (up to 10 times slowdown,
as I do in Lucid) with my large program that has some generic-functions
specialized on over 20 different classes with a number of variable mixins
on run-time classes.
This is precisely the symptom of the "cache assumption breakdown."
Namely, you probably can't get the identically same example to be the
breakdown case in two different implementations of Lisp, because
just the slightest change in "hashing numbers" used for the overall
technique will skew the distribution of entries in the cache. There
is a verrrry non-linear change here for just a trivial skew.
The other relevant tidbit is the factore of 10; that is exactly the
slowdown factor I observed several years ago when first noticeing
the "assumptions breakdown" problem. Compare this factor with the
re: Another question brought up by all this is why generic function calls on
classes that have :arounds with one call-next-method take so much longer
than calls on classes that only have a primary? E.g. fast-foo on class11
here takes 5x as long (3x as long in Franz) as fast-foo on class1 (0.104 msec
vs 0.019 msec). Isn't all of the "hard" work done in looking up the
effective method for a class in the first place? If the effective methods
were computed and stored for each run-time class, then a call-next-method
should (basically) involve primarily an additional funcall of a (known)
next method function, which should be trivial in comparison to the
effective-method-function lookup done by the generic function.
You are right in your analyses here -- the observable slowdown ought to be
the extra layer of function-entry-and-argument-collection, and subsequent
argument-re-spreading-and-function-apply. In this arena, the observable
time differences between a "very best" port of the PCL technology and a
"pedestrian" port ought to be in the range of the 3-to-5 that you saw at
the micro level between Franz and Lucid on the Sun4.
-- JonL --