From: Stephen Adams <edu/mit/csail/zurich/adams>
Date: Tue, 26 Nov 1996 17:32:06 +0000 (+0000)
Subject: Speed up SORT! 45% by using fixnum index arithmetic.
X-Git-Tag: 20090517-FFI~5320
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c88ae0bcd9d953da4c63816cf321ec99df70af2d;p=mit-scheme.git

Speed up SORT! 45% by using fixnum index arithmetic.
---

diff --git a/v7/src/runtime/msort.scm b/v7/src/runtime/msort.scm
index 0fe9902a6..5b2bfd0e8 100644
--- a/v7/src/runtime/msort.scm
+++ b/v7/src/runtime/msort.scm
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/msort.scm,v 14.1 1988/06/13 11:47:52 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/msort.scm,v 14.2 1996/11/26 17:32:06 adams Exp $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -70,6 +70,12 @@ MIT in each case. |#
 ;; <=, rather than like <).
 
 (define (sort! v pred)
+
+  (define-integrable < fix:<)
+  (define-integrable > fix:>)
+  (define-integrable 1+ fix:1+)
+  (define-integrable + fix:+)
+
   (define (sort-internal! vec temp low high)
     (if (< low high)
 	(let* ((middle (quotient (+ low high) 2))