Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!wasatch!utah-gr!uplherc!sp7040!obie!wes From: wes@obie.UUCP (Barnacle Wes) Newsgroups: comp.lang.c Subject: Re: Array indexing vs. pointers... Summary: But remember! Message-ID: <208@obie.UUCP> Date: 7 Oct 88 03:10:58 GMT References: <225800077@uxe.cso.uiuc.edu> Organization: the Well of Souls Lines: 20 In article <225800077@uxe.cso.uiuc.edu>, mcdonald@uxe.cso.uiuc.edu gives six good, fairly detailed tips for optimizing C programs. One thing to keep in mind here is that in general, you are wasting your time trying to optimize the entire program. Most programs spend a large amount of their processing time in a few critical routines. The way to conquer this problem, and not waste a lot of valuable time optimizing the current program, when you could be adding features to the next version :-), is to profile your code. Find out which routines the program spend most of it's time in, and then optimize THOSE routines. If you spend 3 weeks getting this one routine to run in 350 milliseconds, as opposed to 1 second, you have just wasted 3 weeks if that routine is only executed once every third or fourth time the user uses the program. -- {hpda, uwmcsd1}!sp7040!obie!wes "How do you make the boat go when there's no wind?" -- Me --