From fb712f1beaf11548b896849851fe684f9507d406 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Tue, 24 May 2011 09:47:49 +0000 Subject: [PATCH] 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. --- src/pcl/boot.lisp | 13 ++++++++++--- version.lisp-expr | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) 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" -- 1.7.10.4