[Edu-sig] Analyzing algorithms...
Gregor Lingl
glingl@aon.at
Mon, 25 Feb 2002 18:21:46 +0100
In my opinion it is not feasible to
measure or even estimate the runtime-
behaviour of those algorithms from the demos.
They use different time-constants for the
animation:
def do_demo(meth,deltime):
global root
root = Tk()
root.title("Animierte Sortieralgorithmen")
doit(meth,deltime)
root.after(1000)
root.update()
root.destroy()
def demo():
do_demo('bubble',5)
do_demo('bubbleclever ',11)
do_demo('shaker',15)
do_demo('selection ',22)
do_demo('insertion ',4)
do_demo('shell',25)
do_demo('quick',50)
do_demo('heap',28)
do_demo('merge',22)
Moreover most of the time is consumed
by displaying the graphics and it is
questionable if the time consumed by
those canvas.update()-calls is proportional
to the time of the not animated sorts.
Gregor
----- Original Message -----
From: "Kirby Urner" <urnerk@qwest.net>
To: <edu-sig@python.org>
Sent: Monday, February 25, 2002 5:52 PM
Subject: Re: [Edu-sig] Analyzing algorithms...
>
> Judging purely from the demos, insertion-sort seemed fastest.
>
> Kirby
>
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>