> 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
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
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
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
> 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
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
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,
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
>
> >> 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
>
>
>
> 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
>> 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
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
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
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.
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
> +
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,
16 matches
Mail list logo