Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbolic computing is terribly slow #4315

Closed
zimmermann6 opened this issue Oct 17, 2008 · 4 comments
Closed

symbolic computing is terribly slow #4315

zimmermann6 opened this issue Oct 17, 2008 · 4 comments

Comments

@zimmermann6
Copy link

Computing the 10th derivative of x(xx) in Sage is terribly slow:

bash-3.2$ sage
----------------------------------------------------------------------
| SAGE Version 3.1.4, Release Date: 2008-10-16                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage: time a = diff(x^(x^x), x, 10)
CPU times: user 1.71 s, sys: 0.08 s, total: 1.80 s
Wall time: 17.69 s

In comparison with Mathemagix I get:

bash-3.2$ time ./mmxlight/build/mmx-light 
--------------------------------------------------------------
|:*)          Welcome to Mathemagix-light 0.4             (*:|
|  This software falls under the GNU General Public License  |
|          It comes without any warranty whatsoever          |
|------------------------------------------------------------|
|                    (c) 2001--2008 by                       |
|           Joris van der Hoeven, Gregoire Lecerf,           |
|        Bernard Mourrain, Olivier Ruatta and others         |
--------------------------------------------------------------
1] use "symbolix"
2] a = derive (x^x^x, x^^10);
3] quit

real    0m10.021s
user    0m0.339s
sys     0m0.052s

CC: @zimmermann6

Component: calculus

Issue created by migration from https://trac.sagemath.org/ticket/4315

@mwhansen
Copy link
Contributor

comment:1

Hi Paul,

This is certainly much better with the use of Pynac which will (hopefully) be in 3.2:

sage: x = var('x',ns=1)
sage: %time a = (x^(x^x)).diff(x,10)
CPU times: user 0.68 s, sys: 0.00 s, total: 0.68 s
Wall time: 0.71 s

@jasongrout
Copy link
Member

comment:2

For comparison, on sage.math, mathematica gives:

In[1]:= Timing[D[x^(x^x), {x, 10}];]

Out[1]= {0.164011, Null}

while pynac gives:

sage: %timeit a=(x**(x**x)).diff(x,10)
10 loops, best of 3: 609 ms per loop

@zimmermann6
Copy link
Author

comment:3

great, Pynac seems indeed much faster. I thus wait for 3.2.

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Oct 18, 2008

comment:4

Yep, closed since the main pynac ticket (#3872) has been merged.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Oct 18, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants