[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Surprising behavior of eq?
From: |
John Cowan |
Subject: |
Re: Surprising behavior of eq? |
Date: |
Sun, 20 Sep 2020 17:42:27 -0400 |
On Sun, Sep 20, 2020 at 4:52 PM Linus Björnstam <linus.internet@fastmail.se>
wrote:
Just a quick note on guile: if you are testing equality against literals
> guile will optimize to the fastest kind. (equal? b 27) becomes (eq? b 27).
Indeed, it's a Good Thing if equal? starts out with an eqv? test (which
should be inlined except for number comparisons) and eqv? starts out with
an eq? test (which also should be inlined). If the more fine-grained test
returns #t, the more coarse-grained one can safely return #t also. This is
independent of literals, and should IMO be done by every Scheme.
- Surprising behavior of eq?, Zelphir Kaltstahl, 2020/09/20
- Re: Surprising behavior of eq?, Zelphir Kaltstahl, 2020/09/20
- Re: Surprising behavior of eq?, Christopher Lemmer Webber, 2020/09/20
- Re: Surprising behavior of eq?, Zelphir Kaltstahl, 2020/09/20
- Re: Surprising behavior of eq?, John Cowan, 2020/09/20
- Re: Surprising behavior of eq?, Zelphir Kaltstahl, 2020/09/20
- Re: Surprising behavior of eq?, tomas, 2020/09/20
- Re: Surprising behavior of eq?, John Cowan, 2020/09/20
- Re: Surprising behavior of eq?, Linus Björnstam, 2020/09/20
- Re: Surprising behavior of eq?,
John Cowan <=
- Re: Surprising behavior of eq?, Stefan Schmiedl, 2020/09/20
- Re: Surprising behavior of eq?, Zelphir Kaltstahl, 2020/09/20
Re: Surprising behavior of eq?, Taylan Kammer, 2020/09/20