From: Nikodemus Siivola Date: Tue, 24 May 2011 09:47:49 +0000 (+0000) Subject: 1.0.48.22: optimize GENERIC-FUN-INFO X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=fb712f1beaf11548b896849851fe684f9507d406;p=sbcl.git 1.0.48.22: optimize GENERIC-FUN-INFO This isn't a huge bottleneck, but it does get called enough that going over metatypes twice -- esp. once with unoptimized COUNT-IF -- is noticeable in a few places. --- diff --git a/src/pcl/boot.lisp b/src/pcl/boot.lisp index 17de4a4..c1b3f69 100644 --- a/src/pcl/boot.lisp +++ b/src/pcl/boot.lisp @@ -2287,9 +2287,16 @@ bootstrapping. (values (arg-info-applyp arg-info) metatypes arg-info)) - (values (length metatypes) applyp metatypes - (count-if (lambda (x) (neq x t)) metatypes) - arg-info))) + (let ((nreq 0) + (nkeys 0)) + (declare (fixnum nreq nkeys)) + (dolist (x metatypes) + (incf nreq) + (unless (eq x t) + (incf nkeys))) + (values nreq applyp metatypes + nkeys + arg-info)))) (defun early-make-a-method (class qualifiers arglist specializers initargs doc &key slot-name object-class method-class-function diff --git a/version.lisp-expr b/version.lisp-expr index 69ee89c..f2015d0 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -20,4 +20,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.48.21" +"1.0.48.22"