From: Stephen Adams Date: Sat, 29 Jan 1994 21:40:06 +0000 (+0000) Subject: Minor efficiency tweak for eqv? on fixnums X-Git-Tag: 20090517-FFI~7311 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c86589876298476a96f754cdda35af95e4707c89;p=mit-scheme.git Minor efficiency tweak for eqv? on fixnums --- 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)