From: Paul Khuong Date: Wed, 13 Nov 2013 18:16:27 +0000 (-0500) Subject: Use SCHWARTZIAN-STABLE-SORT-LIST in SELECT-LOCATION X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=cf96bb4253ddc05188f4a45aead5f0497339ad17;p=sbcl.git Use SCHWARTZIAN-STABLE-SORT-LIST in SELECT-LOCATION LOOP in a :KEY function may not be the best idea. --- 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