Minor efficiency tweak for eqv? on fixnums
authorStephen Adams <edu/mit/csail/zurich/adams>
Sat, 29 Jan 1994 21:40:06 +0000 (21:40 +0000)
committerStephen Adams <edu/mit/csail/zurich/adams>
Sat, 29 Jan 1994 21:40:06 +0000 (21:40 +0000)
v7/src/runtime/equals.scm

index 42902f1fb7cb99cfcf116d14bcf34a73aef77cc2..415ca5a1e8df593be45c29344b75f27e340c1266 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: equals.scm,v 14.6 1993/11/20 21:33:38 cph Exp $
+$Id: equals.scm,v 14.7 1994/01/29 21:40:06 adams Exp $
 
 Copyright (c) 1988-93 Massachusetts Institute of Technology
 
@@ -43,12 +43,13 @@ MIT in each case. |#
   ;; for everything but numbers, so we take advantage of that.
   (or (eq? x y)
       (if (object-type? (object-type x) y)
-         (if (number? y)
-             (and (= x y)
-                  (boolean=? (exact? x) (exact? y)))
-             (and (object-type? (ucode-type vector) y)
-                  (fix:zero? (vector-length x))
-                  (fix:zero? (vector-length y))))
+         (and (not (fix:fixnum? x))
+              (if (number? y)
+                  (and (= x y)
+                       (boolean=? (exact? x) (exact? y)))
+                  (and (object-type? (ucode-type vector) y)
+                       (fix:zero? (vector-length x))
+                       (fix:zero? (vector-length y)))))
          (and (number? x)
               (number? y)
               (= x y)