From c86589876298476a96f754cdda35af95e4707c89 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Sat, 29 Jan 1994 21:40:06 +0000 Subject: [PATCH] Minor efficiency tweak for eqv? on fixnums --- v7/src/runtime/equals.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/v7/src/runtime/equals.scm b/v7/src/runtime/equals.scm index 42902f1fb..415ca5a1e 100644 --- a/v7/src/runtime/equals.scm +++ b/v7/src/runtime/equals.scm @@ -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) -- 2.25.1