Ticket #3841 (closed enhancement: invalid)
[patch retracted] Use singular for calculus by default.
|Reported by:||gfurnish||Owned by:||gfurnish|
This patch makes symbolic polynomials use libsingular via the ring interface by default. It also contains a large number of doctest changes because polynomials in Sage have a better ordering.
%cython from sage.calculus.calculus import var from sage.rings.integer cimport Integer from random import random def blah(rng): global five x,y = var('x,y') foo = x cdef i for i from 0<=i<rng: foo+= x**int(random()*1000)+y**int(random()*10000)+x+1 return foo The python code used to test maxima was: sage: def blah(rng): foo = x for i in xrange(0, rng): foo+=x^int(random()*10000)+y^int(random()*10000)+x+1; foo = simplify(foo) return foo I'm well aware that I'm comparing cython timings to python timings.. but the cython overhead isn't the dominating factor here. The simplify exists to force it to go to maxima to evaluate the expression between additions (as singular does). Otherwise this is not a very fair/real world comparison if Maxima gets to build the entire addition and send it to Maxima as one batch (and only do the addition once as opposed to rng times). %timeit blah(10) 125 loops, best of 3: 1.98 ms per loop Maxima: CPU times: user 0.14 s, sys: 0.05 s, total: 0.18 s Wall time: 1.97 s %timeit blah(100) 25 loops, best of 3: 20.8 ms per loop Maxima: CPU times: user 3.30 s, sys: 1.16 s, total: 4.47 s Wall time: 28.89 s %timeit blah(1000) 5 loops, best of 3: 214 ms per loop Maxima: Raises exception %timeit blah(10000) 5 loops, best of 3: 2.09 s per loop
- Status changed from new to closed
- Resolution set to invalid
- Summary changed from [with patch, not ready for review] Use singular for calculus by default. to [patch retracted] Use singular for calculus by default.