On Sun, Sep 20, 2020 at 4:52 PM Linus Björnstam <linus.inter...@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.