anchor.diff:                 (flet ((mkdef (name &key docstring)
                           `(defsubst ,name (,s1 ,s2 &key (start1 0) end1 (start2 0) end2 ,@keys)
                              ,@(unsplice docstring)
  -                           (let ((,s1 (string ,s1))
  -                                 (,s2 (string ,s2)))
  +                           (declare (array-length start1 start2))
  +                           (let* ((,s1 (string ,s1))
  +                                  (,s2 (string ,s2))
  +                                  (end1 (or end1 (length ,s1)))
  +                                  (end2 (or end2 (length ,s2))))
  +                             (declare (array-length end1 end2))
  +                             (declare (string ,s1 ,s2))
                                (macrolet ((call (fun &rest args)
                                             `(,fun ,@args
                                                    :start1 start1 :start2 start2
  
positive.code:      (find S1 (tokens S2) :test #'string=),
  but without consing."
      ;; Adapted from split-sequence.
      (let ((length (length s2))
            (end (or end2 (length s2))))
        (declare (array-length length end))
        (macrolet ((compare-segment (left right)
                     `(not (mismatch s1 s2 :start1 start1 :end1 end1
                                           :start2 ,left :end2 ,right
  
negative.code:                 = start2
                    then (+ right 1)
                for right of-type array-length
                  = (min (or (position-if #'whitespacep s2 :start left) len)
                         end)
                    thereis (and (not (= right left))
                                 (compare-segment left right))
  