#11430: is_pseudoprime_small_power has bugs with get_data=True
--------------------------------+-------------------------------------------
Reporter: itolkov | Owner: itolkov
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.7.1
Component: basic arithmetic | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
--------------------------------+-------------------------------------------
Changes (by itolkov):
* status: new => needs_review
Comment:
Timing (ispsp is a more compact version, ispsp2 is this version,
is_pseudoprime_small_power is the current version):
{{{
sage: timeit('ispsp(3^1024, bound=1024)')
sage: timeit('ispsp2(3^1024, bound=1024)')
sage: timeit('is_pseudoprime_small_power(3^1024, bound=1024)')
125 loops, best of 3: 3.29 ms per loop
125 loops, best of 3: 3.29 ms per loop
125 loops, best of 3: 3.29 ms per loop
sage: timeit('ispsp(31, bound=1024)')
sage: timeit('ispsp2(31, bound=1024)')
sage: timeit('is_pseudoprime_small_power(31, bound=1024)')
625 loops, best of 3: 3.45 µs per loop
625 loops, best of 3: 1.8 µs per loop
625 loops, best of 3: 1.47 µs per loop
sage: timeit('ispsp(31^2, bound=1024)')
sage: timeit('ispsp2(31^2, bound=1024)')
sage: timeit('is_pseudoprime_small_power(31^2, bound=1024)')
625 loops, best of 3: 6.41 µs per loop
625 loops, best of 3: 5.92 µs per loop
625 loops, best of 3: 15.1 µs per loop
sage: timeit('ispsp(31^5, bound=1024)')
sage: timeit('ispsp2(31^5, bound=1024)')
sage: timeit('is_pseudoprime_small_power(31^5, bound=1024)')
625 loops, best of 3: 9.45 µs per loop
625 loops, best of 3: 8.92 µs per loop
625 loops, best of 3: 22 µs per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11430#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 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.