(make-fast-alist alist) creates a fast-alist from the input
alist, returning alist itself or, in some cases, a new object equal to
Note: it is often better to use with-fast-alist; see with-fast-alist.
Logically, make-fast-alist is the identity function.
(defun make-fast-alist (alist)
(declare (xargs :guard t))
Under the hood, we construct and return an object that is equal to
alist and which is a fast alist. If alist is already a fast alist,
almost no work is required: we simply return it unchanged.
When alist is not fast, we must minimally construct a hash table for
its bindings. It is often possible to bind this new hash table to alist
itself. But in certain cases when the alist keys are not normed, a new
alist must be constructed, also, and so we may return an equal but not
eq alist. (In these cases, we still try to avoid at least some consing
by reusing the "longest normed tail" of the alist.)