1.0.6.39: COMPUTE-DISCRIMINATING-FUNCTION micro-optimization
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 8 Jun 2007 21:24:53 +0000 (21:24 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Fri, 8 Jun 2007 21:24:53 +0000 (21:24 +0000)
 * Old versio used WITH-SLOTS to read DFUN-STATE twice per call,
   but (let ((dfun-state (slot-value gf 'dfun-state))) ...)
   is faster, as it avoids the second lookup.

src/pcl/methods.lisp
version.lisp-expr

index 36fb2c0..f203810 100644 (file)
       (eq gf #'slot-boundp-using-class)))
 
 (defmethod compute-discriminating-function ((gf standard-generic-function))
-  (with-slots (dfun-state arg-info) gf
+  (let ((dfun-state (slot-value gf 'dfun-state)))
     (when (special-case-for-compute-discriminating-function-p gf)
       ;; if we have a special case for
       ;; COMPUTE-DISCRIMINATING-FUNCTION, then (at least for the
          ((eq gf #'slot-boundp-using-class)
           (update-slot-value-gf-info gf 'boundp)
           #'slot-boundp-using-class-dfun)
-         ((gf-precompute-dfun-and-emf-p arg-info)
+         ((gf-precompute-dfun-and-emf-p (slot-value gf 'arg-info))
           (make-final-dfun gf))
          (t
           (make-initial-dfun gf))))
index f0503a5..b958aab 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.6.38"
+"1.0.6.39"