;;;; -*- coding: utf-8; -*-
changes in sbcl-1.0.17 relative to 1.0.16:
+ * optimization: ADJOIN and PUSHNEW are upto ~70% faster in normal
+ SPEED policies.
* bug fix: dynamic extent allocation of nested lists and vectors
could leak to otherwise accessible parts.
* bug fix: invalid optimization of heap-allocated alien variable
(declaim (maybe-inline
tree-equal nth %setnth nthcdr last last1 make-list append
- nconc nconc2 member-if member-if-not tailp adjoin union
+ nconc nconc2 member-if member-if-not tailp union
nunion intersection nintersection set-difference nset-difference
set-exclusive-or nset-exclusive-or subsetp acons
assoc-if assoc-if-not rassoc rassoc-if rassoc-if-not subst subst-if
(when (and testp notp)
(error ":TEST and :TEST-NOT were both supplied."))
(let ((key (and key (%coerce-callable-to-fun key))))
- (declare (inline member))
(if (let ((key-val (apply-key key item)))
(if notp
(member key-val list :test-not test-not :key key)
list
(cons item list))))
+(define-compiler-macro adjoin (item list &rest keys)
+ (with-unique-names (n-item n-list)
+ `(let ((,n-item ,item)
+ (,n-list ,list))
+ (if (member ,n-item ,n-list ,@keys)
+ ,n-list
+ (cons ,n-item ,n-list)))))
+
(defconstant +list-based-union-limit+ 80)
(defun union (list1 list2 &key key (test #'eql testp) (test-not nil notp))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.16.4"
+"1.0.16.5"