#4000: [with patch, needs work] Implement QQ['x'] via Flint ZZ['x'] +
denominator
------------------------------+---------------------------------------------
Reporter: malb | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone: sage-wishlist
Component: basic arithmetic | Keywords:
Reviewer: | Author: Martin Albrecht
Merged: |
------------------------------+---------------------------------------------
Comment(by spancratz):
> > As the last question about the implementation (for this method), I
noticed that polynomials over QQ in SAGE have the method ``denominator``,
which clearly this implementation should overwrite. On which level/ in
which file should this be done?
>
> You would add a method {{{denominator()}}} to
{{{Polynomial_rational_dense_flint}}}.
OK, I'll do that.
> > Finally, here are the performance timings, in each case for ten random
polynomials of degree 2000, first the time for the generic implementation
and then the time for this implementation with FLINT:
>
> If I understand this correctly, then addition is 20x faster than the
previous implementation just because you avoid a remalloc?
Yes. Actually, throughout I am now trying very hard to re-use variables
rather than allocating new variables all over the place. It makes the
code quite ugly... but definitely faster, which this is about, right? :)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4000#comment:20>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---