#4533: [with patch; needs work] 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 mabshoff):
{{{
[11:56pm] craigcitro: mabshoff: there's an easy fix for the problem in
#4533
[11:56pm] craigcitro: it's a rebase issue
[11:56pm] mabshoff_: mk
[11:56pm] mabshoff_: if you can rebase the patch it would be cool.
[11:56pm] craigcitro: integer_ring. occurs in the patch
[11:56pm] craigcitro: just delete that.
[11:56pm] mabshoff_: I didn't even look yet
[11:56pm] mabshoff_: ?
[11:56pm] mabshoff_: Let me see
[11:56pm] craigcitro: it refers to
[11:56pm] craigcitro: integer_ring.ZZ
[11:57pm] craigcitro: it should just be ZZ
[11:57pm] craigcitro: it's something i cleaned up when i did stuff to
arith.py
[11:57pm] craigcitro: but rob was using 3.1.4 when he wrote the patch
[11:57pm] craigcitro: and it's hitting a case we didn't think to try once
it was rebased, probably
[11:57pm] mabshoff_: mk
[11:58pm] craigcitro: actually, i also just spotted a minor issue in that
file
[11:58pm] craigcitro: where memory is only freed in one case ...
[11:58pm] mabshoff_: ok:
[11:58pm] mabshoff_: + if R in [int, long]:
[11:58pm] mabshoff_: + n = ZZ(n) # we have specalized code for this
case, make sure it gets used
[11:58pm] mabshoff_: + try:
[11:58pm] craigcitro: yep
[11:58pm] mabshoff_: Well, post a new patch and I will test it.
[11:58pm] craigcitro: that should fix the problem you were hitting
[11:59pm] craigcitro: it's just outdenting one line
[11:59pm] craigcitro: the sage_free(ptr)
[11:59pm] craigcitro: should be one level back
[11:59pm] craigcitro: oh, wait
[11:59pm] craigcitro: nevermind
[11:59pm] craigcitro: he already takes care of it somewhere else in the
code.
[12:00am] craigcitro: so that's not an issue.
[12:00am] mabshoff_: Arrg, I just deleted the edited patch
[12:00am] craigcitro: doh
[12:02am] mabshoff_: Well, I can fix it.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4533#comment:18>
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
-~----------~----~----~----~------~----~------~--~---