我无法重现它。
在 LispWorks 中,对随机数向量进行排序比对随机数列表进行排序要快。
(defun test ()
  (let* ((list (loop repeat 10000000 collect (random 1000000)))
         (vector (coerce list 'vector)))
    (time (sort list #'>))
    (time (sort vector #'>))
    (values)))
例子:
CL-USER 9 > (test)
Timing the evaluation of (SORT LIST (FUNCTION >))
User time    =        8.697
System time  =        0.027
Elapsed time =        8.626
Allocation   = 170168 bytes
145 Page faults
Timing the evaluation of (SORT VECTOR (FUNCTION >))
User time    =        5.951
System time  =        0.018
Elapsed time =        5.904
Allocation   = 120512 bytes
86 Page faults
向量为 5.951 秒,而列表为 8.697 秒。
在 Common Lisp 中,一维数组就是向量。SORT也不适用于其他多维数组。
CL-USER 10 > (vector 'a 'b 'c)
#(A B C)
CL-USER 11 > (describe *)
#(A B C) is a (SIMPLE-VECTOR 3)
0      A
1      B
2      C
CL-USER 12 > (arrayp **)
T
CL-USER 13 > (typep (vector 'a 'b 'c) '(array symbol (3)))
T
因此,三个符号的向量也是一个长度为 3 且元素类型为 3 的一维数组SYMBOL。
对于我的示例(带有 Intel i7 处理器的 Apple Macbook Air):
Implementation   | faster | seconds
-----------------+--------+--------
LispWorks 64bit  | vector |  5.951
Clozure CL 64bit | vector |  6.727
SBCL 1.1 64bit   | list   |  8.890
CLISP            | list   | 42.968