Peter Bex <[email protected]> writes:
> On Sat, Apr 27, 2019 at 07:33:49AM +0300, megane wrote: >> Peter Bex <[email protected]> writes: >> > On Fri, Apr 26, 2019 at 10:06:15PM +0300, megane wrote: >> >> Hi folks! >> >> >> >> Do you think that adding specializations for multiple argument calls to >> >> mathematical functions is worth it? Like this: >> > >> > We have a rewrite for this already, I wonder why it's not being applied. >> > >> > That's (rewrite 'scheme#+ 19) in c-platform.scm (on line 728). >> >> I see. That is handled in optimizer.scm (line 1221). The optimizer runs >> after the scrutinizer and the scrutinizer only runs once. And it's the >> scrutinizer that installs the specializations in types.db. > > Ah, so this effectively means some of the rewrites are useless since the > specializations make them inapplicable. We should consider what to do > with that. I have no clue what would happen if we change the order in > which they run, so maybe just remove rewrite 19 and replace it with your > suggestion? In this case I would just move rewrite 19 to happen before scrutiny. In general, some optimizations like rewrite 19 help the scrutinizer. The scrutinizer makes transformations that might enable some optimizations, which might help the scrutinizer, ... i.e. "cascading optimizations". The optimizer seems to do this kind of looping. The scrutinizer just isn't part of that (and probably can't be as the optimizer works with CPS IIUC). > > What do the others think? > > Cheers, > Peter _______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
