Re: [Chicken-hackers] Handling multiple args in types.db

2019-04-27 Thread felix . winkelmann
> In scrutinizer, just at the beginning of 'walk' just try different kind > of optimizations. Like rewrite 19 and the constant folding thing that > was added recently (which is done in pretty icky place currently). Like > this: > > (try-optimizations node) > .. continue with normal walk .. >

Re: [Chicken-hackers] Handling multiple args in types.db

2019-04-27 Thread felix . winkelmann
> > 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".

Re: [Chicken-hackers] Handling multiple args in types.db

2019-04-27 Thread megane
Peter Bex writes: > On Sat, Apr 27, 2019 at 09:35:21AM +0300, megane wrote: >> Peter Bex writes: >> > 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

Re: [Chicken-hackers] Handling multiple args in types.db

2019-04-27 Thread Peter Bex
On Sat, Apr 27, 2019 at 09:35:21AM +0300, megane wrote: > Peter Bex writes: > > 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

Re: [Chicken-hackers] Handling multiple args in types.db

2019-04-27 Thread megane
Peter Bex writes: > On Sat, Apr 27, 2019 at 07:33:49AM +0300, megane wrote: >> Peter Bex 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

Re: [Chicken-hackers] Handling multiple args in types.db

2019-04-27 Thread Peter Bex
On Sat, Apr 27, 2019 at 07:33:49AM +0300, megane wrote: > Peter Bex 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

Re: [Chicken-hackers] Handling multiple args in types.db

2019-04-26 Thread megane
Peter Bex 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.

Re: [Chicken-hackers] Handling multiple args in types.db

2019-04-26 Thread Peter Bex
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)

[Chicken-hackers] Handling multiple args in types.db

2019-04-26 Thread megane
Hi folks! Do you think that adding specializations for multiple argument calls to mathematical functions is worth it? Like this: diff --git a/types.db b/types.db index b5bc766..e91c482 100644 --- a/types.db +++ b/types.db @@ -316,7 +316,10 @@ ((integer integer) (integer)