#4533: [with patch; needs review] divisors function slow for integers
----------------------+-----------------------------------------------------
Reporter: robertwb | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-3.2.1
Component: algebra | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Comment (by robertwb):
Surprisingly, magma isn't super good at this problem. All timings on
sage.math
{{{
sage: n = factorial(20)
sage: %timeit v = n.divisors()
100 loops, best of 3: 15.6 ms per loop
sage: pari_n = gp(n)
sage: %timeit v = pari_n.divisors()
10 loops, best of 3: 57.2 ms per loop
sage: magma_n = magma(n)
sage: %timeit v = magma_n.Divisors()
10 loops, best of 3: 43.5 ms per loop
sage: n = factorial(31) // 2^26
sage: %timeit v = n.divisors()
10 loops, best of 3: 145 ms per loop
sage: pari_n = gp(n)
sage: %timeit v = pari_n.divisors()
10 loops, best of 3: 408 ms per loop
sage: magma_n = magma(n)
sage: %timeit v = magma_n.Divisors()
10 loops, best of 3: 684 ms per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4533#comment:15>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---