From c88ae0bcd9d953da4c63816cf321ec99df70af2d Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Tue, 26 Nov 1996 17:32:06 +0000 Subject: [PATCH] Speed up SORT! 45% by using fixnum index arithmetic. --- v7/src/runtime/msort.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)) -- 2.25.1