[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] Mostly fix #1604
From: |
Peter Bex |
Subject: |
[Chicken-hackers] [PATCH] Mostly fix #1604 |
Date: |
Sat, 18 May 2019 15:18:27 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
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.
Maybe we can add something to declare specializations as being for fixnum
mode or regular mode? Anyway, something for later; it might fit in with
the restructuring of #1611. Or not.
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 the same C function as the following subtractions. The code
that uses = will get the comparisons in a C function and then call a CPS
function which does the subtractions. Any ideas why this is? It makes
a massive difference, so I think it's worthwhile to at least understand
what's going on here.
Cheers,
Peter
0001-Fix-the-most-of-1604-by-restoring-rewrites-dropped-i.patch
Description: Text Data
signature.asc
Description: PGP signature
- [Chicken-hackers] [PATCH] Mostly fix #1604,
Peter Bex <=
Re: [Chicken-hackers] [PATCH] Mostly fix #1604, felix . winkelmann, 2019/05/19