From 2c4f8db463028034cf6d10c45f35e3b9ecb7378c Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Fri, 8 Jun 2007 21:24:53 +0000 Subject: [PATCH] 1.0.6.39: COMPUTE-DISCRIMINATING-FUNCTION micro-optimization * 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 | 4 ++-- version.lisp-expr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pcl/methods.lisp b/src/pcl/methods.lisp index 36fb2c0..f203810 100644 --- a/src/pcl/methods.lisp +++ b/src/pcl/methods.lisp @@ -1514,7 +1514,7 @@ (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 @@ -1535,7 +1535,7 @@ ((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)))) diff --git a/version.lisp-expr b/version.lisp-expr index f0503a5..b958aab 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4