eq is a single
machine instruction in most Lisp implementations and is inlined,
i.e. doesn't require a function call.
In contrast, eql is usually
not inlined - it incurs the overhead of a function call and
performs additional type checks if eq
returns nil.
Some experiments with SBCL show a factor ~10 difference in
performance between eq and eql.
Does it matter within Maxima? Maybe. member is called extremely often,
and during a test suite run, it's the top #7 function where
time is being spent.
Maxima basically uses member
as a short way of writing:
(or (eq ...) (eq ...) ...)
I'd argue that in this long-form, if we know we're working
with symbols, we would definitely use eq,
not eql. So if we optimize for
eq in long-form code, shouldn't
we be just as deliberate when using member?