Re: [sage-devel] timeit in the cloud vs terminal

2015-05-06 Thread William Stein
On Wed, May 6, 2015 at 7:03 AM, jplab wrote: > Hi! > > Compare the following code in the command line and the cloud: > > In the terminal: > > sage: t=timeit('factor(ZZ.random_element(10^40))', seconds=True) > sage: t > 0.019134044647216797 > sage: type(t) > > > In the cloud: > > sage: t=timeit('f

[sage-devel] timeit in the cloud vs terminal

2015-05-06 Thread jplab
Hi! Compare the following code in the command line and the cloud: In the terminal: sage: t=timeit('factor(ZZ.random_element(10^40))', seconds=True) sage: t 0.019134044647216797 sage: type(t) In the cloud: sage: t=timeit('factor(ZZ.random_element(10^40))', seconds=True) 0.0210275173187 sage: t

Re: Re: [sage-devel] timeit for mathematicians

2011-12-20 Thread William Stein
Tom Boothby's did something much like this once... On Dec 20, 2011 9:25 AM, "David Roe" wrote: -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at ht

Re: Re: [sage-devel] timeit for mathematicians

2011-12-20 Thread David Roe
That sounds awesome, and not too hard to do. I'll add it to my wishlist as well. David On Tue, Dec 20, 2011 at 02:25, Nicolas M. Thiery wrote: > On Fri, Dec 16, 2011 at 10:12:35AM -0800, Harald Schilly wrote: >>    done, it's here: http://trac.sagemath.org/sage_trac/ticket/12168 > > Speaking of

Re: Re: [sage-devel] timeit for mathematicians

2011-12-20 Thread Nicolas M. Thiery
On Fri, Dec 16, 2011 at 10:12:35AM -0800, Harald Schilly wrote: >done, it's here: http://trac.sagemath.org/sage_trac/ticket/12168 Speaking of timing code, one tool I have been dreaming about for a while is: sage: def random_data(n): ... sage: def my_algorithm(data):

Re: Re: [sage-devel] timeit for mathematicians

2011-12-16 Thread Harald Schilly
On Friday, December 16, 2011 6:42:09 PM UTC+1, William wrote: > > Do it! > done, it's here: http://trac.sagemath.org/sage_trac/ticket/12168 H -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-

Re: Re: [sage-devel] timeit for mathematicians

2011-12-16 Thread William Stein
On Dec 16, 2011 9:25 AM, "Harald Schilly" wrote: > > > > On Thursday, December 15, 2011 1:06:57 AM UTC+1, William wrote: >> >> One heads up here -- many factoring algorithms are nondeterministic. > > > Hi, thank's for pointing this out! But I think at that point one has to ask what one wants to me

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread William Stein
On Wed, Dec 14, 2011 at 3:39 PM, Harald Schilly wrote: > On Wed, Dec 14, 2011 at 23:50, Harald Schilly > wrote: >> I hacked something together that plots a histogram... > > I made a second version, that uses the timeit command directly and > scales the x-axis manually (i.e. including the 0) > >

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
On Wed, Dec 14, 2011 at 23:50, Harald Schilly wrote: > I hacked something together that plots a histogram... I made a second version, that uses the timeit command directly and scales the x-axis manually (i.e. including the 0) It just times the factor function, but feel free to edit the .sage fil

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
On Thu, Dec 15, 2011 at 00:10, William Stein wrote: > > What were you timing? > well, it's in the attached sage file, nothing serious: factor(2**111-1), 10 inner loops and 200 repetitions. if you have a better example to test, go ahead or tell me :) H -- To post to this group, send an email t

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread William Stein
On Wed, Dec 14, 2011 at 2:50 PM, Harald Schilly wrote: > I hacked something together that plots a histogram. Well, it looks odd, > maybe there is a big obvious bug -- but nevertheless, it's not symmetric and > in no way a normal distribution! What were you timing? > H > > > -- > To post to this

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
I hacked something together that plots a histogram. Well, it looks odd, maybe there is a big obvious bug -- but nevertheless, it's not symmetric and in no way a normal distribution! H -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Fernando Perez
On Wed, Dec 14, 2011 at 10:11 AM, Harald Schilly wrote: > Nice plots of it are > called box-plots. This captures everything more accurately than the > min/mean/sd scheme. (The reason why quantiles aren't used that much in > the past is just that sorting is much harder than sum+division.) A nice s

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
On Wed, Dec 14, 2011 at 19:06, Martin Albrecht wrote: > I should mention that we do test random matrices and that some of our > algorithms depend on the input (e.g., they are rank sensitive). So perhaps at > least for some tests we run, it makes a bit of sense?  But we should at least > also outpu

Re: Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Martin Albrecht
On Wednesday 14 December 2011, Volker Braun wrote: > On Wednesday, December 14, 2011 12:18:58 AM UTC, Martin Albrecht wrote: > > It uses the "Student-t" method to estimate the certainty > > This is precisely what the python documentation warns about (see Nils' > post). The timings are not normal d

Re: [sage-devel] timeit for mathematicians

2011-12-14 Thread Harald Schilly
On Wednesday, December 14, 2011 2:36:24 AM UTC+1, Volker Braun wrote: > The timings are not normal distributed. Yes, I just wanted to add the same. mean and standard deviation only made sense if you have a normal distribution. This t-test martin mentioned only checks if the assumption about t

Re: [sage-devel] timeit for mathematicians

2011-12-13 Thread William Stein
On Tue, Dec 13, 2011 at 5:36 PM, Volker Braun wrote: > On Wednesday, December 14, 2011 12:18:58 AM UTC, Martin Albrecht wrote: >> >> It uses the "Student-t" method to estimate the certainty > > This is precisely what the python documentation warns about (see Nils' > post). The timings are not norm

Re: [sage-devel] timeit for mathematicians

2011-12-13 Thread Volker Braun
On Wednesday, December 14, 2011 12:18:58 AM UTC, Martin Albrecht wrote: > > It uses the "Student-t" method to estimate the certainty > This is precisely what the python documentation warns about (see Nils' post). The timings are not normal distributed. Especially if your code is deterministic it

Re: [sage-devel] timeit for mathematicians

2011-12-13 Thread Martin Albrecht
On Tuesday 13 December 2011, William Stein wrote: > Thoughts?Are there any experts out there in code benchmarking done > from a more mathematically sophisticated perspective than just one > number? It's entirely possible I'm making some stupid mistake in > suggesting the above. Carlo Wood

[sage-devel] timeit for mathematicians

2011-12-13 Thread William Stein
Hi, I was just looking at some timings for trac 12149, and it occurred to me that our "timeout" command may be fine for programmers, but for us mathematicians surely we want something that gives a better measure of the distribution of timings? Wouldn't it be nice to get both the mean and standard

[sage-devel] timeit limitations?

2008-11-24 Thread Tim Lahey
Hi, In exploring integration using FriCAS vs. Maxima, I've noticed that timeit doesn't seem to want to work for integration. Taking an example from the Axiom Wiki, If I do: var('x') f = 2*x/sin(x)^2 f.integrate(x) axiom.integrate(f,x) all is fine. However, as soon as I try to put a timeit arou

[sage-devel] timeit

2008-02-25 Thread Joel B. Mohler
Hi, I just noticed that the timeit short-cut seems more broken than normal (at least I think this worked previous to 2.10.2: sage: R.=ZZ[] sage: f=x^2-1 sage: timeit f.factor() File "", line 1 timeit f.factor() ^ :