> Here's what I figured out fwiw:
>
> This is the program from #1604:
>
> (define (fib n)
> (if (or (= n 0) (= n 1))
> n
> (+ (fib (- n 1)) (fib (- n 2)
>
> (time (let loop ((n 0))
> (when (< n 35)
> (fib n)
> (loop (+ n 1)
>
>
On Sat, May 18, 2019 at 06:15:07PM +0200, felix.winkelm...@bevuta.com wrote:
> > Finally, I ran into this head scratcher: I tried to replace = with eq? in
> > the code and it sped up the code by a *lot*. However, in fixnum
> > arithmetic mode, = gets rewritten to C_eqp. The difference in the C
>
Peter Bex writes:
> Hi all,
>
> Attached is a patch to restore rewrites for the common arithmetic
> operators when in fixnum arithmetic mode.
>
Interesing stuff!
[snip]
>
> Finally, I ran into this head scratcher: I tried to replace = with eq? in
> the code and it sped up the code by a
> Finally, I ran into this head scratcher: I tried to replace = with eq? in
> the code and it sped up the code by a *lot*. However, in fixnum
> arithmetic mode, = gets rewritten to C_eqp. The difference in the C
> output is that the code that uses eq? directly gets this completely
> inlined in
Hi all,
Attached is a patch to restore rewrites for the common arithmetic
operators when in fixnum arithmetic mode.
I'm not 100% happy with it, because as the patch says, the scrutinizer
will preemptively rewrite some calls before we can figure out that we
can unsafely use the fixnum versions.