anchor.diff:                (time-string 0-arg-cost)
                 (time-string slope)))))
   
  +(defmacro n-arg-defmethod (name n)
  +  (let ((args (loop for i below n collect (gensym))))
  +    `(defgeneric ,name (,@args)
  +       (:method (,@args) (declare (ignore ,@args))))))
  +
  +(n-arg-defmethod 0-arg-defmethod 0)
  +
  +(n-arg-defmethod 50-arg-defmethod 50)
  +
   ;; TODO more CLOS benchmarks
   
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   ;;;
   ;;; lists and sequences
  -
  -(defun find-runtime (sequence)
  -  (let ((item #\!))
  -    (runtime
  -     (lambda (invocations)
  -       (dotimes (i invocations)
  -         (find item sequence))))))
   
   (answer |What is the cost of FINDing things?|
     (let* ((length 100)
  
positive.code:     (format t "~a per element of of a vector.~%"
              (time-string (/ (find-runtime vector) length)))))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;
  ;;; hash tables
  
  (defun hash-runtime (test keys)
    (let ((hash-table (make-hash-table :test test))
          (keys (apply #'vector keys)))
      (loop for key across keys do
        (setf (gethash key hash-table) nil))
      (let ((keys (shuffle keys))
            tmp)
        (values
         (runtime
          (lambda (invocations)
            (declare (type fixnum invocations)
                     (type (simple-array t (*)) keys))
            (dotimes (i (floor invocations (length keys)))
              (dotimes (i (length keys))
                (setf tmp (gethash (svref keys i) hash-table))))))
         tmp))))
  
  (answer |What is the cost of a hash table lookup?|
    (let ((eq (hash-runtime #'eq (iota 40)))
  
negative.code:             (time-string
               (/ (- equalp-100 equalp-0) 100)))))
  
  (defun hash-runtime (test keys)
    (let ((hash-table (make-hash-table :test test))
          (keys (apply #'vector keys)))
      (loop for key across keys do
        (setf (gethash key hash-table) nil))
      (let ((keys (shuffle keys))
            tmp)
        (values
         (runtime
          (lambda (invocations)
            (declare (type fixnum invocations)
                     (type (simple-array t (*)) keys))
            (dotimes (i (floor invocations (length keys)))
              (dotimes (i (length keys))
                (setf tmp (gethash (svref keys i) hash-table))))))
         tmp))))
  
  ;; TODO hash table versus alist
  
  ;; TODO hash table rehash cost
  