Opened 13 years ago
Last modified 4 years ago
#5930 closed enhancement
[with patch, needs review] switch from maxima to pynac for core symbolic manipulation system — at Version 10
Reported by: | was | Owned by: | mhansen |
---|---|---|---|
Priority: | blocker | Milestone: | sage-4.0 |
Component: | symbolics | Keywords: | |
Cc: | burcin | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
SEE http://wiki.sagemath.org/symbolics/pynac_todo/push
If you want to try the code out do this:
- Apply symbolics_final1.patch from #5777
- Apply symbolics_final2.patch from this ticket.
- Build new pynac spkg:
http://sage.math.washington.edu/home/mhansen/pynac-0.1.7.spkg
Change History (10)
comment:1 Changed 13 years ago by
- Cc burcin added
- Component changed from algebra to symbolics
comment:2 Changed 13 years ago by
- Description modified (diff)
comment:3 Changed 13 years ago by
- Description modified (diff)
comment:4 Changed 13 years ago by
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.
comment:5 Changed 13 years ago by
- Description modified (diff)
comment:6 Changed 13 years ago by
- Description modified (diff)
comment:7 Changed 13 years ago by
- Description modified (diff)
- Milestone changed from sage-4.0.1 to sage-4.0
comment:8 Changed 13 years ago by
- Description modified (diff)
- Owner changed from tbd to mhansen
- Status changed from new to assigned
- Summary changed from switch from maxima to pynac for core symbolic manipulation system to [with patch, needs review] switch from maxima to pynac for core symbolic manipulation system
I've attached symbolics_final2.patch which applies on top of #5777. This patch also requires the Pynac 0.1.7 spkg at http://sage.math.washington.edu/home/mhansen/pynac-0.1.7.spkg
comment:9 Changed 13 years ago by
- Description modified (diff)
comment:10 Changed 13 years ago by
- Description modified (diff)
Bug/Issue?: Control-C doesn't work in some cases.