anchor.diff:                        (rec start3 n/4))))))
           (rec 0 n)))))
   
  -(defun gen-base-difs ()
  -  (list `(dif/1 (start)
  -          (declare (ignore start))
  -          nil)
  -        `(dif/2 (start)
  -          (declare (type index start))
  -          (let ((s0 (aref vec start))
  -                (s1 (aref vec (1+ start))))
  -            (setf (aref vec      start) (+ s0 s1)
  -                  (aref vec (1+ start)) (- s0 s1)))
  -          nil)
  -        `(dif/4 (start)
  -          (declare (type index start))
  -          (let* ((s0 (aref vec start))
  -                 (s2 (aref vec (+ start 2)))
  -                 (s0+s2 (+ s0 s2))
  -                 (s0-s2 (- s0 s2))
  -                 
  -                 (s1 (aref vec (+ start 1)))
  -                 (s3 (aref vec (+ start 3)))
  -                 (s1+s3 (+ s1 s3))
  -                 (s1-s3 (mul+i (- s1 s3))))
  -            (setf (aref vec       start) (+ s0+s2 s1+s3)
  -                  (aref vec (+ start 1)) (- s0+s2 s1+s3)
  -                  (aref vec (+ start 2)) (- s0-s2 s1-s3)
  -                  (aref vec (+ start 3)) (+ s0-s2 s1-s3)))
  -          nil)
  -        ;; I think this one is worse than split-radix
  -        `(dif/8 (start)
  -          (declare (type index start))
  -          (let* ((s0 (aref vec start))
  -                 (s4 (aref vec (+ start 4)))
  -                 (s0+4 (+ s0 s4))
  -                 (s0-4 (- s0 s4))
  -                 
  -                 (s1 (aref vec (+ start 1)))
  -                 (s5 (aref vec (+ start 5)))
  -                 (s1+5 (+ s1 s5))
  -                 (s1-5 (- s1 s5))
  -                 
  -                 (s2 (aref vec (+ start 2)))
  -                 (s6 (aref vec (+ start 6)))
  -                 (s2+6 (+ s2 s6))
  -                 (s2-6 (- s2 s6))
  -                 
  -                 (s3 (aref vec (+ start 3)))
  -                 (s7 (aref vec (+ start 7)))
  -                 (s3+7 (+ s3 s7))
  -                 (s3-7 (- s3 s7)))
  -            (let ((a (+ s0+4 s2+6))
  -                  (b (+ s1+5 s3+7)))
  -              (setf (aref vec       start) (+ a b)
  -                    (aref vec (+ start 1)) (- a b)))
  -            (let ((a (- s0+4 s2+6))
  -                  (b ,(mul-root '(- s1+5 s3+7)
  -                                -2/8)))
  -              (setf (aref vec (+ start 2)) (+ a b)
  -                    (aref vec (+ start 3)) (- a b)))
  -            (let ((a (+ s0-4 ,(mul-root 's2-6 -2/8)))
  -                  (b ,(mul-root `(+ s1-5 ,(mul-root 's3-7 -2/8))
  -                                -1/8)))
  -              (setf (aref vec (+ start 4)) (+ a b)
  -                    (aref vec (+ start 5)) (- a b)))
  -            (let ((a (+ s0-4 ,(mul-root 's2-6 -6/8)))
  -                  (b ,(mul-root `(+ ,(mul-root 's1-5 -2/8)
  -                                    s3-7)
  -                                -1/8)))
  -              (setf (aref vec (+ start 6)) (+ a b)
  -                    (aref vec (+ start 7)) (- a b)))
  -            nil))))
  -
   (defun gen-dif (n &key (scale 1d0) window)
     (let ((defs '())
  -        (base-defs (gen-base-difs))
           (last n))
       (labels ((name (n)
                  (intern (format nil "~A/~A" 'dif n)))
  -             (gen (n)
  +             (gen (n &aux (name (name n)))
  +               (when (member name defs :key #'first)
  +                 (return-from gen name))
                  (cond
  -                 ((= n 16)
  -                  (gen 8)
  +                 ((<= n *fwd-base-case*)
                     (push
  -                   `(dif/16 (start)
  -                     (declare (type index start))
  -                     (for (8 (i start)
  -                             ,@(and (= n last)
  -                                    window
  -                                    `((k window-start))))
  -                       (let ((x ,(if (= n last)
  -                                     `(%window (%scale (aref vec i) ,scale)
  -                                               ,window
  -                                               ,(if window 'k 0))
  -                                     `(aref vec i)))
  -                             (y ,(if (= n last)
  -                                     `(%window (%scale (aref vec (+ i 8)) ,scale)
  -                                               ,window
  -                                               ,(if window `(+ k 8) 0))
  -                                     `(aref vec (+ i 8)))))
  -                         (setf (aref vec i) (+ x y)
  -                               (aref vec (+ i 8)) (- x y))))
  -                       (dif/8 start)
  -                       ,@(loop
  -                           for i below 4
  -                           collect
  -                           `(let ((x (aref vec (+ start ,(+ i 8))))
  -                                  (y (mul-i (aref vec (+ start ,(+ i 8 4))))))
  -                              (setf (aref vec (+ start ,(+ i 8)))
  -                                    ,(mul-root
  -                                      `(+ x y) (* -1/16 i)
  -                                      `(aref twiddle ,(+ 8 +twiddle-offset+
  -                                                         (* 2 i))))
  -                                    (aref vec (+ start ,(+ i 8 4)))
  -                                    ,(mul-root
  -                                      `(- x y) (* -3/16 i)
  -                                      `(aref twiddle ,(+ 8 +twiddle-offset+
  -                                                         1
  -                                                         (* 2 i)))))))
  -                       (dif/4 (+ start 8))
  -                       (dif/4 (+ start 12)))
  +                   `(,(name n) (start)
  +                     (declare (type index start)
  +                              (ignorable start))
  +                     ,(if (= n last)
  +                          (gen-flat-dif n :scale scale :window window)
  +                          (gen-flat-dif n)))
                      defs))
                    ((> n *fwd-base-case*)
  +                  (gen (truncate n 4))
                     (gen (truncate n 2))
                     (let* ((n/2 (truncate n 2))
                            (n/4 (truncate n 4))
  
positive.code:                              (,name/4 (+ start ,(+ n/2 n/4))))))
                      (push body defs))))))
        (gen n)
        `(labels (,@base-defs ,@(nreverse defs))
           (declare (ignorable ,@(mapcar (lambda (x) `#',(car x)) base-defs))
                    (inline ,@(mapcar #'car base-defs)
                            ,(name n)))
           ,(and (<= n *fwd-base-case*)
                 (not (and (eql scale 1d0)
                           (null window)))
                 `(for (,n (i start)
                           ,@(and window `((j window-start))))
                    (setf (aref vec i) (%scale
                                        (%window (aref vec i)
                                                 ,window
                                                 ,(if window 'j 0))
                                        ,scale))))
           (,(name n) start)))))
  
  (defun %dif (vec start n twiddle)
  
negative.code: (defvar *fwd-base-case* 32)
  
  (defun gen-flat-dif (n &key (scale 1d0) window)
    (with-vector (n :maxlive 13)
  