From: Eli Bendersky
Subject: Re: a short article about equality in Lisp (for beginners)
Date:
Message-ID: <cf5qe3$5va@odak26.prod.google.com>
Pascal Costanza wrote:
> Eli Bendersky wrote:
>
> > Well, I'm not sure. Using disassemble, eq seems quite a bit
> > simpler/faster than eql. It's basically just one comparison/branch.
eql
> > is much more convoluted.
>
> You don't know anything about the efficiency of a particular piece of
> assembly code just by looking at it, no matter what it looks like.
I think we're getting off topic here, but yes, I can know the
efficiency of assembly by looking at it. In fact, assembly is
probably the only level at which I can really know it.
It's not hard to spot the difference between eq's trivial (one
jump) code, and eql's implementation featuring a subroutine call.
> Much
> less do you know how often it is actually used in a real application,
> i.e. how it actually affects the overall efficiency of some program.
I
> don't think that a considerably large portion of the runtime of any
> program is spent in equivalence predicates, except for benchmarks
that
> test equivalence predicates.
>
With this I wholeheartedly I agree. Premature optimization is indeed
the root of all evil :-)
In any case, I changed that paragraph in the article, to sound less
intimidating.
Thanks for the feedback
Eli