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:                        ((complex double-float) #'crunch-c64))))
                (funcall f length a1 a1 a2)
                (funcall f length a2 a2 a1)))))))))
  
  (answer |How many floating-point operations can this system do per second?|
    (format t "~a in single precision and ~a in double precision.~%"
            (flops-string (max (flops 'single-float)
                               (flops '(complex single-float))))
            (flops-string (max (flops 'double-float)
                               (flops '(complex double-float))))))
  
negative.code:   (format t "~@[ ~a~].~%"
            (machine-version)))
  
  (answer |What is the cost of allocating objects?|
    (flet ((array-cost (bytes)
             (runtime
              (lambda (invocations)
                (dotimes (i invocations)
                  (touch
                   (make-array
                    bytes
                    :element-type '(unsigned-byte 8)))))))
           (cons-cost ()
             (runtime
              (lambda (invocations)
                (let (tmp)
                  (dotimes (i invocations)
                    (push 42 tmp))
                  (touch tmp)))))
           (struct-cost (constructor)
             (runtime
              (lambda (invocations)
                (dotimes (i invocations)
                  (touch (funcall constructor))))))
           (class-cost (class)
             (runtime
              (lambda (invocations)
                (dotimes (i invocations)
                  (touch (make-instance class)))))))
      ;; TODO compute GC deallocation cost
      (format t "~a for allocating conses.~%"
              (time-string (cons-cost)))
      (let* ((x0 4)
             (x1 100000)
             (y0 (array-cost x0))
             (y1 (array-cost x1))
             (slope (/ (- y1 y0) (- x1 x0))))
        (format t "~a, plus ~a per byte for allocating arrays.~%"
                (time-string y0)
                (time-string slope)))
      (let* ((y0 (struct-cost #'make-0-slot-struct))
             (y50 (struct-cost #'make-50-slot-struct))
             (slope (/ (- y50 y0) 200)))
        (format t "~a, plus ~a per slot for allocating structs.~%"
                (time-string y0)
                (time-string slope)))
      (let* ((y0 (class-cost (find-class '0-slot-class)))
             (y50 (class-cost (find-class '50-slot-class)))
             (slope (/ (- y50 y0) 50)))
        (format t "~a, plus ~a per slot for instantiating classes.~%"
                (time-string y0)
                (time-string slope)))))
  
  (defmacro n-slot-struct (name n)
    (let ((slots
            (loop for i below n
                  collect
                  `(,(intern (format nil "SLOT-~d" i))
                    0 :type fixnum))))
      `(defstruct ,name ,@slots)))
  
  (n-slot-struct 0-slot-struct 0)
  
  (n-slot-struct 50-slot-struct 50)
  
  (defmacro n-slot-class (name n)
    (let ((slots
            (loop for i below n
                  collect
                  `(,(intern (format nil "SLOT-~d" i))
                    :type fixnum :initform 0))))
      `(defclass ,name () ,slots)))
  
  (n-slot-class 0-slot-class  0)
  
  (n-slot-class 50-slot-class 50)
  
  (answer |What is the cost of garbage collection?|
    (let ((gc-0
  