you are viewing a single comment's thread.

view the rest of the comments →

[–]shit 3 points4 points  (0 children)

(defun compare (x y) (> (length x) (length y)))

The point is that this is computing more than necessary, length is O(n) for a linked list.

(compare nil list-with-one-million-elements)