Comment 4 for bug 503081

Revision history for this message
Douglas Katzman (dougk) wrote :

The change from LAMBDA to NAMED-LAMBDA causes the given lambda expression never (or rarely) to be structurally similar to anything already cached. This completely defeats the cache, which I think was probably unintentional.

SB-PCL> *fgens*
#<HASH-TABLE :TEST EQUAL :COUNT 21 {100034D4B3}>
SB-PCL> (handler-bind ((implicit-generic-function-warning #'muffle-warning))
 (loop for i below 500
do (eval `(defmethod ,(symbolicate "F" (write-to-string i)) ((a cons)) (list ,i a)))))
NIL
SB-PCL> *fgens*
#<HASH-TABLE :TEST EQUAL :COUNT 521 {100034D4B3}>

whereas if you back out the change, and print *fgens* before and after ...
*fgens* => #<HASH-TABLE :TEST EQUAL :COUNT 22 {100034D4B3}>
...
*fgens* => #<HASH-TABLE :TEST EQUAL :COUNT 23 {100034D4B3}>