I forgot to copy the list in my reply to Steve Haflich.
I was just testing speed and discovered that eql, and
thus case, do not do what I want with strings.
I remember reading differently yesterday
On 09/13/2013 04:57 PM, Henry Baker wrote:
> Why do you think that eql is slower than string= ?
> Have you tested this?
Yes, eql is much faster than string=, which is obvious after
discovering that eql will never compare strings character by
character. equal is also significantly slower than string=.
> > (defmacro case (keyform &body cases)
> > (case-body 'case keyform cases t 'eql nil nil nil))
> >
> > The code to generate the bodies is somewhat involved,
> > but is mostly error checking.
> >
> >> (case-body 'mycase 'keyform '((1 1) (2 2)) t '= nil nil nil)
> >
> > (LET ((#:G1424768 KEYFORM))
> > (DECLARE (IGNORABLE #:G1424768))
> > (COND ((= #:G1424768 '1) NIL 1) ((= #:G1424768 '2) NIL 2)))
> >
> > --John
>