On Mon, Nov 24, 2008 at 6:17 PM, Tim Lahey <[EMAIL PROTECTED]> wrote:
>
>
> On Nov 24, 2008, at 9:05 PM, William Stein wrote:
>>
>>> I can easily run timing comparisons between maxima and FriCAS, but
>>> because
>>> of how sympy does things (with its separate variables), I'll have
>>> to run
>>> them separately. Comparing maxima and FriCAS, the timings are pretty
>>> close on
>>> both for most of the ones I've tried. A few were much longer in
>>> FriCAS.
>>>
>>> I have a pretty long list of integrals to go through and I've only
>>> done 16.
>>
>> Many thanks for doing this!
>>
>> William
>>
>
> No problem. Once it's done it should help as automated tests for both
> monitoring performance and correctness. I'll be happy to donate them
> to the cause. It's going to take a while.
>
> The timeit routines give results that look like:
> 5 loops, best of 3: 50 ms per loop
>
> Does anybody have something to pull out the specific time (50ms)?
In Sage-3.2 somebody (thanks!) nicely refactored the timeit code
somewhat, so that this is well supported. This is probably related
to the doctest improvements that mabshoff just mentioned.
Anyway, here is an example:
sage: from sage.misc.sage_timeit import sage_timeit
sage: a = sage_timeit('3^10000',globals())
sage: a
625 loops, best of 3: 35.2 µs per loop
sage: type(a)
<type 'instance'>
sage: a.stats
(625, 3, 3, 35.214614868164062, '\xc2\xb5s')
sage:a.__repr__??
def __repr__(self):
return "%d loops, best of %d: %.*g %s per loop" % self.stats
The stats are:
(number, repeat, precision, best * scaling[order], units[order])
It would be nice if you contribute some new integration doctests or
something even before you have something massive and
comprehensive.
William
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---