From cf96bb4253ddc05188f4a45aead5f0497339ad17 Mon Sep 17 00:00:00 2001 From: Paul Khuong Date: Wed, 13 Nov 2013 13:16:27 -0500 Subject: [PATCH] Use SCHWARTZIAN-STABLE-SORT-LIST in SELECT-LOCATION LOOP in a :KEY function may not be the best idea. --- src/compiler/pack.lisp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/compiler/pack.lisp b/src/compiler/pack.lisp index 3e5a57d..451f83e 100644 --- a/src/compiler/pack.lisp +++ b/src/compiler/pack.lisp @@ -1351,13 +1351,14 @@ (let ((locations (sc-locations sc))) (when optimize (setf locations - (stable-sort (copy-list locations) #'> - :key (lambda (location-offset) - (loop for offset from location-offset - repeat element-size - maximize (svref - (finite-sb-always-live-count sb) - offset)))))) + (schwartzian-stable-sort-list + locations '> + :key (lambda (location-offset) + (loop for offset from location-offset + repeat element-size + maximize (svref + (finite-sb-always-live-count sb) + offset)))))) (dolist (offset locations) (when (or use-reserved-locs (not (member offset -- 1.7.10.4