- (cond ((eql x y) t)
- ((consp x)
- (and (consp y)
- (equal (car x) (car y))
- (equal (cdr x) (cdr y))))
- ((stringp x)
- (and (stringp y) (string= x y)))
- ((pathnamep x)
- (and (pathnamep y) (pathname= x y)))
- ((bit-vector-p x)
- (and (bit-vector-p y)
- (bit-vector-= x y)))
- (t nil)))
+ ;; Non-tail self-recursion implemented with a local auxiliary function
+ ;; is a lot faster than doing it the straightforward way (at least
+ ;; on x86oids) due to calling convention differences. -- JES, 2005-12-30
+ (labels ((equal-aux (x y)
+ (cond ((%eql x y)
+ t)
+ ((consp x)
+ (and (consp y)
+ (equal-aux (car x) (car y))
+ (equal-aux (cdr x) (cdr y))))
+ ((stringp x)
+ (and (stringp y) (string= x y)))
+ ((pathnamep x)
+ (and (pathnamep y) (pathname= x y)))
+ ((bit-vector-p x)
+ (and (bit-vector-p y)
+ (bit-vector-= x y)))
+ (t nil))))
+ ;; Use MAYBE-INLINE to get the inline expansion only once (instead
+ ;; of 200 times with INLINE). -- JES, 2005-12-30
+ (declare (maybe-inline equal-aux))
+ (equal-aux x y)))