2008/7/9 William Stein <[EMAIL PROTECTED]>:
>>> Thanks for doing all this!  See Sage integrates into your
>>> environment after all :-).
>>
>> Yes and it made me pretty excited!! Only it's 4x slower than sympy:
>
> Is that "4 x" all Sage startup time, i.e., the time to do
> "from sage.all import *"?

Yes. I work in a way that I edit a python file and the run it in
python. So if the packages takes 2s to import, I need to wait for 2s
everytime I edit
a file and test it.

> Shouldn't you time something
> like this:
>
> sage: timeit('integrate(x^2/3 - log(x))')
> 5 loops, best of 3: 39.5 ms per loop
>
> versus in sympy:
>
> sage: from sympy import *
> sage: x = var("x")
> sage: timeit('integrate(x**int(2)/int(3)-log(x), x)')
> 5 loops, best of 3: 78.9 ms per loop

This benchmark is only interesting if you have a larger program that
does these things many times, or just calculates something bigger.
But for the programming experience, the important thing is my edit
debug cycle latency.

>
> Hey, that's interesting that Sage can convert
> an expression to maxima, have maxima do the
> integral, get the result back from maxima, parse
> the result using regexps and eval, and get the
> answer twice as quickly as sympy does the
> integral natively....

It's very impressive indeed.

>
> So there are two components, startup time and
> doing the integration.  The startup time totally
> swamps the time of integration.

Yep. When I get a little while I'll try to measure how many digits of
pi you need to calculate, so that Sage is faster than pure python
sympy's calculation (i.e. without gmpy).

>
> Since the sage you're using undoubtedly imports
> sympy racing the two is a little unfair, plus there
> is also the startup time for Maxima.
>
> By the way sympy is imported by every startup
> of sage even in 3.0.4, though we'll deal with that soon
> enough:
>
> teragon-2:build was$ ./sage-3.0.4.rc0/sage -startuptime |grep sympy
>            sympy: 0.098 (sage.calculus.calculus)

Yes, I am sorry about this trojan horse, it was definitely not an
intention. :) I hope after the patch all will be fine.

And sorry Gary I misspelled your name! You know, those non-english
speakers sometimes put one less or more letters than it should be. :)


Ondrej

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to