-;;; The execution time of this version is exponential to some function
-;;; of number of gf methods and argument lists. It was taking
-;;; literally hours to load the presentation methods from the
-;;; cl-http w3p kit.
-#+nil
-(defun dispatch-dfun-cost (gf)
- (generate-discrimination-net-internal
- gf (generic-function-methods gf) nil
- #'(lambda (methods known-types)
- (declare (ignore methods known-types))
- 0)
- #'(lambda (position type true-value false-value)
- (declare (ignore position))
- (+ (max true-value false-value)
- (if (eq 'class (car type))
- (let ((cpl (class-precedence-list (class-of (cadr type)))))
- (cond((memq *the-class-built-in-class* cpl)
- *built-in-typep-cost*)
- ((memq *the-class-structure-class* cpl)
- *structure-typep-cost*)
- (t
- *non-built-in-typep-cost*)))
- 0)))
- #'identity))
-
-;;; This version is from the pcl found in the gcl-2.1 distribution.
-;;; Someone added a cost limit so as to keep the execution time controlled
+;;; According to comments in the original CMU CL version of PCL,
+;;; the cost LIMIT is important to cut off exponential growth for
+;;; large numbers of gf methods and argument lists.