[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] procedure identity

John Cowan <cowan@x> writes:

> Taylan Ulrich B. scripsit:
>> eq? is a (typically) more efficient eqv?, 
> I have yet to be convinced that `eq?` actually is more efficient
> than `eqv?` on the safe types.

I suppose type-inference can reduce many uses of eqv? to eq?, and when
inference fails, the difference is merely a dispatch on the type-tag.
It still cannot be as efficient in absolutely all cases though, can it?
Perhaps the total cost of globally substituting eqv? for eq? is not as
big as I would've imagined, given a sufficiently intelligent compiler.

Scheme-reports mailing list