Re: [fricas-devel] Silent dependencies and array packs

2016-09-08 Thread oldk1331
> Possibly. Theoretically QVELT should be very fast, but > in the past test showed that QREFELT is faster, so we > use it when speed matter. The difference between QVELT and QREFELT is a fixnum declaration, but that doesn't make a difference in my benchmark. > Note that 1-based cases uses

Re: [fricas-devel] Silent dependencies and array packs

2016-09-08 Thread Waldek Hebisch
oldk1331 wrote: > > OK, the '<' specialization for INT/NNI/PI instead of SPADCALL > speed things up a lot. > > Now, I removed the comparison to benchmark only array indexing > performance: > > x < y == > print("<"::OutputForm) > for i in 0..(dim

Re: [fricas-devel] Silent dependencies and array packs

2016-09-08 Thread oldk1331
I read CLTL2 chapters about arrays, so: In common lisp, vector is 1-d array. And quote: "svref may be faster than aref" So there's no reason to use ELT in array1.spad. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread oldk1331
OK, the '<' specialization for INT/NNI/PI instead of SPADCALL speed things up a lot. Now, I removed the comparison to benchmark only array indexing performance: x < y == print("<"::OutputForm) for i in 0..(dim - 1) repeat a

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Ralf Hemmecke
> So you want something like > >-- Duplicated to gain speed via inlining of '<' in integer case. >if R is ... >-- copy 1 >else >-- copy 2 Yes, that is clearer. Ralf -- You received this message because you are subscribed to the Google Groups "FriCAS - computer

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Waldek Hebisch
oldk1331 wrote: > > What you mean by "arbitrary indexed"? Sparse arrays? Associative > > arrays? Functions? > > I mean IndexedVector, for example. Vector(R) is IndexedVector(R,1). > Vector is used much more than IndexedVector. > And openaxiom removed IndexedVector. I do not see much gain

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Waldek Hebisch
Ralf Hemmecke wrote: > > On 09/07/2016 04:53 PM, Waldek Hebisch wrote: > >> https://github.com/oldk1332/fricas/commit/a1aef4aeba6092a5525d70e772e75a1e182957b7.patch > >> > >> whether to use > >> > >> + for i in 0..(dim - 1) repeat > >> + a : R := QREFELT(x,

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Ralf Hemmecke
On 09/07/2016 04:53 PM, Waldek Hebisch wrote: >> https://github.com/oldk1332/fricas/commit/a1aef4aeba6092a5525d70e772e75a1e182957b7.patch >> >> whether to use >> >> + for i in 0..(dim - 1) repeat >> + a : R := QREFELT(x, i)$Lisp >> + b : R

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Waldek Hebisch
> > >> 2. In qelt/elt of Vector/ARRAY1, we can use QREFELT instead of ELT? > > I've already asked me if INT, NNI, and PI all use pointer as > representation, why does it make a diffenence (in terms of time?) in > >

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Waldek Hebisch
> > On 09/07/2016 04:13 PM, oldk1331 wrote: > > I mean IndexedVector, for example. Vector(R) is IndexedVector(R,1). > > Vector is used much more than IndexedVector. > > And openaxiom removed IndexedVector. > > I wouldn't go as far as removing IndexedVector, but if there is a > frequent use case

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Ralf Hemmecke
>> 2. In qelt/elt of Vector/ARRAY1, we can use QREFELT instead of ELT? I've already asked me if INT, NNI, and PI all use pointer as representation, why does it make a diffenence (in terms of time?) in https://github.com/oldk1332/fricas/commit/a1aef4aeba6092a5525d70e772e75a1e182957b7.patch

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Waldek Hebisch
oldk1331 wrote: > > Some observations: > > 1. In this case, types other than INT/NNI/PI can use QREFELT > instead of qelt and gain speed? (test with FRAC INT, 15% faster) NNI is used by "distributed" polynomials, so it is performance critical. I very much doubt in 15% gain due to array

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread oldk1331
Some observations: 1. In this case, types other than INT/NNI/PI can use QREFELT instead of qelt and gain speed? (test with FRAC INT, 15% faster) 2. In qelt/elt of Vector/ARRAY1, we can use QREFELT instead of ELT? 3. Old question again: is it useful to support arbitrary indexed array? (no

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Ralf Hemmecke
On 09/07/2016 02:50 PM, Waldek Hebisch wrote: > Actually to 'QREFELT' part just uses fact that Lisp arrays are > always 0-based. It does not depend on VECTORMININDEX at all. > In fact, the other branch uses indexes starting from 1 so > depends on VECTORMININDEX. Yes, and this is bad in my eyes.

Re: [fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Waldek Hebisch
Ralf Hemmecke wrote: > > On 09/07/2016 01:05 PM, oldk1331 wrote: > > https://github.com/oldk1332/fricas/commit/a1aef4aeba6092a5525d70e772e75a1e182957b7.patch > > In your patch are the lines (in DirectProduct) > > + x < y == > + for i in 0..(dim - 1) repeat > +

[fricas-devel] Silent dependencies and array packs

2016-09-07 Thread Ralf Hemmecke
On 09/07/2016 01:05 PM, oldk1331 wrote: > https://github.com/oldk1332/fricas/commit/a1aef4aeba6092a5525d70e772e75a1e182957b7.patch In your patch are the lines (in DirectProduct) + x < y == + for i in 0..(dim - 1) repeat + a : R := QREFELT(x,