Dear Michael,

On Nov 27, 8:55 pm, mabshoff <[EMAIL PROTECTED]
dortmund.de> wrote:
> Interesting trick. But with Sage 3.2 or higher you can actually get
> the performance data back from timeit - 
> seehttp://groups.google.com/group/sage-devel/browse_thread/thread/b91c51...
> about the Integral testing code which uses that technique.

Do you mean one can do a relative comparison such as the following?
sage: T1=timeit.eval('fast code')
sage: T2=timeit.eval('slow code')
sage: T2.stats[3]/T1.stats[3] > 200
True

Yes, that might be testable.

But then one has to take care of cases such as T1 is 1 Microsecond and
T2 is 1 Millisecond.
T2.stats[3]/T1.stats[3] would be 1, isn't it? So, one has to take into
account stats[4].

Is there a more comfortable way than doing the following?
sage: D={'s':10^6,'ms':10^3,'\xc2\xb5s':1}
sage: T2.stats[3]*D[T2.stats[4]]/(T1.stats[3]*D[T1.stats[4]]) > 200
True

Cheers
    Simon

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to