#5930: switch from maxima to pynac for core symbolic manipulation system
-------------------------+--------------------------------------------------
 Reporter:  was          |       Owner:  tbd     
     Type:  enhancement  |      Status:  new     
 Priority:  blocker      |   Milestone:  sage-4.0
Component:  symbolics    |    Keywords:          
-------------------------+--------------------------------------------------

Comment(by was):

 There is a sequence of *serious* speed regressions that I think Burcin
 caused by changes to the pynac spkg:

 IN SAGE-3.2 we get OK timings for this benchmarks.  They aren't great, but
 I can live with them, since it is"only" 57 times slower than Singular:
 {{{
 sage: var('x,y,z', ns=1); f = (x+y+z)^6;
 sage: timeit('(f*(f+1)).expand()')
 125 loops, best of 3: 3.25 ms per loop
 }}}

 In Singular:
 {{{
 sage: R.<x,y,z> = QQ[]
 sage: timeit('g=(x+y+z)^6*((x+y+z)^6+1)')
 625 loops, best of 3: 56.3 µs per loop
 sage: 3250/56.3
 57.7264653641208
 }}}

 It's hard to tell, but Mathematica seems to take about 1.7ms, which is
 comparable to the above:
 {{{
 sage: timeit("s=mathematica('Expand[(x+y+z)^6*((x+y+z)^6+1)]')")
 125 loops, best of 3: 1.81 ms per loop
 sage: timeit("s=mathematica('2+3')")
 625 loops, best of 3: 125 µs per loop
 }}}

 Maxima via Sage takes about 61 ms, since I guess (c)lisp is slow, etc.:
 {{{
 sage: timeit("s=maxima('expand((x+y+z)^6*((x+y+z)^6+1))')")
 5 loops, best of 3: 61.8 ms per loop
 }}}

 First there was a MAJOR unacceptable speed regression going to sage-3.3
 (this is probably all caused by the pynac spkg).  The timing jumped all
 the way to 42ms, so now it's almost as bad as Maxima:
 {{{
 sage: var('x,y,z', ns=1); f = (x+y+z)^6
 (x, y, z)
 sage: timeit('(f*(f+1)).expand()')
 5 loops, best of 3: 42.1 ms per loop
 }}}

 In fact, directly in sage-3.2 with old Maxima symbolics:
 {{{
 sage: var('x,y,z', ns=0); f = (x+y+z)^6
 sage: timeit('(f*(f+1)).expand()')
 5 loops, best of 3: 106 ms per loop
 }}}


 IN SAGE-3.4.2 with new symbolics:
 {{{
 sage: var('x,y,z', ns=1); f = (x+y+z)^6
 (x, y, z)
 sage: timeit('(f*(f+1)).expand()')
 5 loops, best of 3: 206 ms per loop
 }}}

 This may be due to a change in the pynac layer, where it is calling out to
 Python for some reason, even though it shouldn't need to.   206ms is
 really unacceptable.  It's much slower than Maxima itself, it's 63 times
 slower than Pynac *was* just a few months ago, and it's 367 times slower
 than Singular.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5930#comment:4>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to