#7581: use prCopyR to coerce multivariate polynomials in the simple case
-----------------------------------+----------------------------------------
Reporter: malb | Owner: malb
Type: enhancement | Status: positive_review
Priority: major | Milestone: sage-4.3
Component: commutative algebra | Keywords:
Work_issues: | Author: Martin Albrecht
Upstream: N/A | Reviewer: Simon King
Merged: |
-----------------------------------+----------------------------------------
Comment(by SimonKing):
Replying to [comment:15 SimonKing]:
> Replying to [comment:12 SimonKing]:
> ...
> > So, 0.41s for imap and only 0.02s for fetch, in a situation where
(even with your patch) Sage needs 5.43s!
>
> Oops, I was copying the wrong number. With your patch, it is 1.18 s.
However, it'd be great if this could be improved to, say, 0.5s.
>
Double oops. I have my children in the office and am a bit distracted.
OK.
We have
{{{
> system("--ticks-per-sec",1000);
> ring r1 = 0, (x(1..10000)),dp;
> poly p = x(10000);
> ring r2 = 0, (x(1..10001)), dp;
> int t = timer;
> imap(r1,p)+x(10001);
x(10000)+x(10001)
> timer-t;
410
}}}
while we have (with your patch)
{{{
sage: R1 = PolynomialRing(QQ,'x',10001,order='deglex')
sage: R2 = PolynomialRing(QQ,'x',10002,order='deglex')
sage: x10000 = R1('x10000')
sage: x10001 = R2('x10001')
sage: %time R2(x10000) + x10001
CPU times: user 0.74 s, sys: 0.00 s, total: 0.74 s
Wall time: 0.73 s
x10000 + x10001
}}}
I think this is equivalent to what I did in Singular. In other words, your
patch is not far from native Singular.
This confirms my positive review.
Cheers,
Simon
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7581#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.