<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif;font-size:small"> "Well wait. If the original took 15:03 and the the new one took 15 minutes less, then the new one took 3 seconds, which is an astonishing advantage. How long did the original take?"</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small">When I was teaching at Hartford State Technical College (1977-1980) we had a "programmer" write a program for our PDP-11/70 running the RSTS/E operating system.<br><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small">When he ran his program (always at high priority) it took 10.5 HOURS to sort 1306 32-byte records, and while his program was doing that all the student programs (on the same system) would come to a grinding halt. Of course the students complained.<br><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small">Because of a mandatory teacher's union I was prevented from re-writing the program, but I described to a student how to re-write it to be more efficient.<br><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small">The program then performed exactly the same task in less than three minutes at normal priority, so the other students did not even know it was running.<br><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small">md<br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small"><br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 17, 2023 at 8:04 PM Steve Litt via Ale <<a href="mailto:ale@ale.org">ale@ale.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Charles Shapiro via Ale said on Fri, 17 Nov 2023 14:20:13 -0500<br>
<br>
>Heh. Reminds me of the guy at one of my old gigs who spent several<br>
>weeks of coding and testing to replace all of the simple sequential<br>
>loop searches in a pretty big application with sorts + binary<br>
>searches. The original application took several hours to finish.<br>
>After his optimizations, the new version took about fifteen minutes<br>
>less time. **Always** profile before you optimize!<br>
<br>
Well wait. If the original took 15:03 and the the new one took 15<br>
minutes less, then the new one took 3 seconds, which is an astonishing<br>
advantage. How long did the original take?<br>
<br>
SteveT<br>
<br>
Steve Litt <br>
<br>
Autumn 2023 featured book: Rapid Learning for the 21st Century<br>
<a href="http://www.troubleshooters.com/rl21" rel="noreferrer" target="_blank">http://www.troubleshooters.com/rl21</a><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="https://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">https://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div>