0.7.3.1:
[sbcl.git] / src / code / sort.lisp
index 372f2c5..de92015 100644 (file)
     (declare (type index start end))
     (declare (type function predicate))
     (declare (type (or function null) key))
     (declare (type index start end))
     (declare (type function predicate))
     (declare (type (or function null) key))
-    (declare (optimize (speed 3) (safety 3) (debug 1) (space 1)))
+    ;; This used to be (OPTIMIZE (SPEED 3) (SAFETY 3)), but now
+    ;; (0.7.1.39) that (SAFETY 3) means "absolutely safe (including
+    ;; expensive things like %DETECT-STACK-EXHAUSTION)" we get closer
+    ;; to what we want by using (SPEED 2) (SAFETY 2): "pretty fast,
+    ;; pretty safe, and safety is no more important than speed".
+    (declare (optimize (speed 2) (safety 2) (debug 1) (space 1)))
     (if (typep vector 'simple-vector)
        ;; (VECTOR T) is worth optimizing for, and SIMPLE-VECTOR is
        ;; what we get from (VECTOR T) inside WITH-ARRAY-DATA.
     (if (typep vector 'simple-vector)
        ;; (VECTOR T) is worth optimizing for, and SIMPLE-VECTOR is
        ;; what we get from (VECTOR T) inside WITH-ARRAY-DATA.
   #!+sb-doc
   "Destructively sort SEQUENCE. PREDICATE should return non-NIL if
    ARG1 is to precede ARG2."
   #!+sb-doc
   "Destructively sort SEQUENCE. PREDICATE should return non-NIL if
    ARG1 is to precede ARG2."
-  (let ((predicate-function (%coerce-callable-to-function predicate))
-       (key-function (and key (%coerce-callable-to-function key))))
+  (let ((predicate-function (%coerce-callable-to-fun predicate))
+       (key-function (and key (%coerce-callable-to-fun key))))
     (typecase sequence
       (list (sort-list sequence predicate-function key-function))
       (vector
     (typecase sequence
       (list (sort-list sequence predicate-function key-function))
       (vector