<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1555" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial>Keep iterating Robert </FONT><FONT face=Wingdings
size=7><STRONG>J</STRONG><FONT face=Arial size=3> Much better than chick flicks.
Last night I was subjected to "The Piano" - recorded some years ago from tv and
with ads - a Gothic style film. Not my style at all. I would have preferred to
be iterating!</FONT></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Sorry, my problem not your's.</FONT></DIV>
<DIV><FONT face=Arial>.</FONT></DIV>
<DIV><FONT face=Arial>Seriously though, we do need to check on the efficiency of
the various algorithms available to us, and Robert's exercise has provided
useful information.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Robert Hind (Semi-retired)</FONT></DIV>
<DIV><FONT face=Arial>Ex Ashwood and Traralgon</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>----- Original Message ----- </FONT>
<DIV><FONT face=Arial>From: "Timmer-Arends" <</FONT><A
href="mailto:timmer@melbpc.org.au"><FONT
face=Arial>timmer@melbpc.org.au</FONT></A><FONT face=Arial>></FONT></DIV>
<DIV><FONT face=Arial>To: "Year 12 Software Development Teachers' Mailing List"
<</FONT><A href="mailto:sofdev@edulists.com.au"><FONT
face=Arial>sofdev@edulists.com.au</FONT></A><FONT face=Arial>></FONT></DIV>
<DIV><FONT face=Arial>Sent: Sunday, March 11, 2007 3:36 PM</FONT></DIV>
<DIV><FONT face=Arial>Subject: Re: [Year 12 SofDev] An algorithm puzzler for
your kids (and you?)</FONT></DIV></DIV>
<DIV><FONT face=Arial><BR></FONT></DIV><FONT face=Arial>> Mark, you're
probably right but two chick-flicks on the telly and out <BR>> numbered 2 to
1....<BR>> <BR>> Regards<BR>> Robert T-A<BR>> <BR>> -----
Original Message ----- <BR>> From: "Mark Kelly" <</FONT><A
href="mailto:kel@mckinnonsc.vic.edu.au"><FONT
face=Arial>kel@mckinnonsc.vic.edu.au</FONT></A><FONT face=Arial>><BR>> To:
"Year 12 Software Development Teachers' Mailing List" <BR>> <</FONT><A
href="mailto:sofdev@edulists.com.au"><FONT
face=Arial>sofdev@edulists.com.au</FONT></A><FONT face=Arial>><BR>> Sent:
Saturday, March 10, 2007 8:28 PM<BR>> Subject: Re: [Year 12 SofDev] An
algorithm puzzler for your kids (and you?)<BR>> <BR>> <BR>> > O,
Robert! You really ought to take Margaret out dancing.<BR>>
><BR>> > Sitting in the dark running 100 million algorithm iterations
on a Saturday <BR>> > night can't be much fun!<BR>> ><BR>> >
:-)<BR>> ><BR>> > Mark<BR>> ><BR>> > Timmer-Arends
wrote:<BR>> >> Hello Mark and Robert<BR>> >><BR>>
>>> Robert Hind wrote: =(ROUNDUP(n*4,0)/4)<BR>> >>> Mark
Kelly wrote: =(-INT(-n*4)/4)<BR>> >><BR>> >> I switched Excel
to manual recalc then created a small macro that in <BR>> >>
effect<BR>> >> presses F9 (recalc) one million times.<BR>> >>
The results for 5 runs each:<BR>> >> RH: 32.31s, 34.37s, 30.10s,
34.48s, 33.86s<BR>> >> MK (student?): 33.98s, 33.98s, 34.12s, 34.72s,
34.86s<BR>> >><BR>> >> Given that Excel runs in a multitasking
environment where goodness knows<BR>> >> what other processes get a
look in while the calcs are happening probably<BR>> >> explains the
slight variation in times, but I'd say there's not much <BR>> >>
between<BR>> >> the two.<BR>> >><BR>> >> Just for
interest I dragged out an old copy of TurboPascal. Because it <BR>> >>
runs<BR>> >> in DOS mode times were much more consistent:<BR>>
>> Also I could only try out the INT version since TP doesn't have a
RoundUp<BR>> >> function.<BR>> >> The result: 100 million
iterations (yes 100 million): 43.9s<BR>> >><BR>> >> That makes
Excel in the order of 100 times slower than compiled code! <BR>> >>
(and<BR>> >> that's old 8086 code what's more.) Just goes to show the
overheads in <BR>> >> Excel<BR>> >> and Windows
generally.<BR>> >><BR>> >> It would be interesting to get some
times for a compiled VB program.<BR>> >><BR>> >>
Regards<BR>> >> Robert T-A<BR>> >> Brighton SC<BR>>
>><BR>> >><BR>> >> ----- Original Message ----- From:
"Mark Kelly" <BR>> >> <</FONT><A
href="mailto:kel@mckinnonsc.vic.edu.au"><FONT
face=Arial>kel@mckinnonsc.vic.edu.au</FONT></A><FONT face=Arial>><BR>>
>> To: "Year 12 Software Development Teachers' Mailing List"<BR>>
>> <</FONT><A href="mailto:sofdev@edulists.com.au"><FONT
face=Arial>sofdev@edulists.com.au</FONT></A><FONT face=Arial>><BR>>
>> Sent: Friday, March 09, 2007 5:40 PM<BR>> >> Subject: Re:
[Year 12 SofDev] An algorithm puzzler for your kids (and <BR>> >>
you?)<BR>> >><BR>> >><BR>> >>> 3 solutions for the
price of one!<BR>> >>><BR>> >>> Just goes to show the
many ways an algorithm can take shape.<BR>> >>><BR>> >>>
Would be interesting to iterate each one a million times to compare<BR>>
>>> relative execution speeds...<BR>> >>><BR>>
>><BR>> >><BR>> >>
_______________________________________________<BR>> >> </FONT><A
href="http://www.edulists.com.au"><FONT
face=Arial>http://www.edulists.com.au</FONT></A><BR><FONT face=Arial>>
>> IT Software Development Mailing List kindly supported by<BR>>
>> </FONT><A href="http://www.vcaa.vic.edu.au"><FONT
face=Arial>http://www.vcaa.vic.edu.au</FONT></A><FONT face=Arial> - Victorian
Curriculum and Assessment <BR>> >> Authority and<BR>> >>
</FONT><A href="http://www.vitta.org.au"><FONT
face=Arial>http://www.vitta.org.au</FONT></A><FONT face=Arial> - VITTA
Victorian Information Technology <BR>> >> Teachers Association
Inc<BR>> >><BR>> >><BR>> ><BR>> > -- <BR>> >
Mark Kelly<BR>> > Manager - Information Systems<BR>> > McKinnon
Secondary College<BR>> > McKinnon Rd McKinnon 3204, Victoria,
Australia<BR>> > Direct line / Voicemail: 8520 9085<BR>> > School
Phone +613 8520 9000 << new number!<BR>> > School Fax
+613 9578 9253<BR>> ><BR>> > Webmaster - </FONT><A
href="http://www.mckinnonsc.vic.edu.au"><FONT
face=Arial>http://www.mckinnonsc.vic.edu.au</FONT></A><BR><FONT face=Arial>>
> IT Lecture notes: </FONT><A href="http://vceit.com"><FONT
face=Arial>http://vceit.com</FONT></A><BR><FONT face=Arial>> > Moderator:
IPM Mailing List<BR>> ><BR>> > Doctor - We must all face reality
sooner or later.<BR>> > Dowd - I wrestled with reality for 35
years, doctor, and I'm happy to <BR>> > say I won out over it.
('Harvey', 1950)<BR>> ><BR>> ><BR>> >
_______________________________________________<BR>> > </FONT><A
href="http://www.edulists.com.au"><FONT
face=Arial>http://www.edulists.com.au</FONT></A><BR><FONT face=Arial>> >
IT Software Development Mailing List kindly supported by<BR>> > </FONT><A
href="http://www.vcaa.vic.edu.au"><FONT
face=Arial>http://www.vcaa.vic.edu.au</FONT></A><FONT face=Arial> - Victorian
Curriculum and Assessment Authority <BR>> > and<BR>> > </FONT><A
href="http://www.vitta.org.au"><FONT
face=Arial>http://www.vitta.org.au</FONT></A><FONT face=Arial> - VITTA
Victorian Information Technology Teachers <BR>> > Association Inc <BR>>
<BR>> _______________________________________________<BR>> </FONT><A
href="http://www.edulists.com.au"><FONT
face=Arial>http://www.edulists.com.au</FONT></A><BR><FONT face=Arial>> IT
Software Development Mailing List kindly supported by<BR>> </FONT><A
href="http://www.vcaa.vic.edu.au"><FONT
face=Arial>http://www.vcaa.vic.edu.au</FONT></A><FONT face=Arial> - Victorian
Curriculum and Assessment Authority and<BR>> </FONT><A
href="http://www.vitta.org.au"><FONT
face=Arial>http://www.vitta.org.au</FONT></A><FONT face=Arial> - VITTA
Victorian Information Technology Teachers Association Inc</FONT></BODY></HTML>