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
<nicolas.thi...@u-psud.fr> 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 timing code, one tool I have been dreaming about for a
> while is:
>
>        sage: def random_data(n):
>           ...
>        sage: def my_algorithm(data):
>           ...
>        sage: C = complexity_analysis(my_algorithm, data = build_data)
>        Running my_algorithm on data of size 1
>        Running my_algorithm on data of size 2
>        Running my_algorithm on data of size 4
>        ...
>        sage: C                       # worst case complexity estimate
>        O(n^2.32)
>        sage: C.average()             # average complexity estimate
>        O(n^2.32)
>
>        sage: C.run(3600)             # gather more data for one hour
>        ...
>        Running my_algorithm on data of size 128
>        ...
>
>        sage: C
>        O(n^3.001)
>
>        sage: C.plot()                # shows a nice worst case time plot
>        sage: C.average().plot()      # shows a nice average time plot
>
> Cheers,
>                                Nicolas
> --
> Nicolas M. Thiéry "Isil" <nthi...@users.sf.net>
> http://Nicolas.Thiery.name/
>
> --
> 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 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

-- 
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 http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to