Ticket #4315 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

symbolic computing is terribly slow

Reported by: zimmerma Owned by: burcin
Priority: major Milestone: sage-3.2
Component: calculus Keywords:
Cc: zimmerma Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

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

Change History

comment:1 Changed 5 years ago by mhansen

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

comment:2 Changed 5 years ago by jason

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

comment:3 Changed 5 years ago by zimmerma

  • Cc zimmerma added

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

comment:4 Changed 5 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed

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

Cheers,

Michael

Note: See TracTickets for help on using tickets.