Re: [fricas-devel] Re: repeat map! definition in List makes it much faster

2016-09-14 Thread Ralf Hemmecke
On 09/14/2016 12:58 AM, Waldek Hebisch wrote: > Ralf Hemmecke wrote: >> if % is List(S) then >>> >>> You repeat the definition in category, I think repeat the definition >>> in domain would be better? >> >> Certainly better to repeat in List domain. Logically, how would the >> category

Re: [fricas-devel] Re: repeat map! definition in List makes it much faster

2016-09-13 Thread Waldek Hebisch
Ralf Hemmecke wrote: > > >> if % is List(S) then > > > > You repeat the definition in category, I think repeat the definition > > in domain would be better? > > Certainly better to repeat in List domain. Logically, how would the > category know about the actual representation of List.

Re: [fricas-devel] Re: repeat map! definition in List makes it much faster

2016-09-13 Thread Ralf Hemmecke
>> if % is List(S) then > > You repeat the definition in category, I think repeat the definition > in domain would be better? Certainly better to repeat in List domain. Logically, how would the category know about the actual representation of List. Furthermore, there might be other domains

Re: [fricas-devel] Re: repeat map! definition in List makes it much faster

2016-09-13 Thread oldk1331
I think in this case Spad compiler can't do much about it: It generates a SPADCALL in general cases for "rest", and generates an inlined "CDR" for List. So the repeat of defination is unavoidable. (See the arrays, there's map! in OneDimensionalArrayAggregate, but those array domains repeat the

Re: [fricas-devel] Re: repeat map! definition in List makes it much faster

2016-09-13 Thread Waldek Hebisch
> > diff --git a/src/algebra/list.spad b/src/algebra/list.spad > index 564ed16..6b73a97 100644 > --- a/src/algebra/list.spad > +++ b/src/algebra/list.spad > @@ -294,6 +294,12 @@ > if not member?(l11, l2) then lu := concat(l11, lu) > l1 := rest l1 >lu > +