#16374: better two_squares, three_squares, four_squares for small input
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.3
Component: number theory | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/16374 | 7cf5fff24e77135cc00032a7347d4e5a6402324b
Dependencies: #16308 | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vdelecroix):
* commit: => 7cf5fff24e77135cc00032a7347d4e5a6402324b
* branch: => u/vdelecroix/16374
Comment:
Hi,
I implemented a much better version than my proposal in #16308 (linear
complexity in the input for `two_squares_pyx`). It is not yet branched in
`arith.py`, I will do this when #16308 is merged.
timings:
{{{
sage: from sage.rings.arith_pyx import four_squares_pyx
sage: timeit("for n in xrange(10000,50000): x = four_squares_pyx(n)")
5 loops, best of 3: 46 ms per loop
}}}
Best
Vincent
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=7cf5fff24e77135cc00032a7347d4e5a6402324b
7cf5fff]||{{{trac #16374: new file arith_pyx.pyx}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/16374#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.