On Tue, Aug 10, 2004 at 01:47:52PM -0400, Brett Simpson said: > On Mon, 2004-08-09 at 22:21, Stephen Gran wrote: > > Don't loop - make a more complicated data structure, like a multi level > > hash (ugly pseudo-code to follow): > > Ok. > > > Just read the file once, fill in the bits as you go, and process the > > whole thing at the end. > > I wrote this and it's much much faster. In fact the old way of looping > through the file multiple times took a 1 minute and 20 seconds while the > code below took 20 seconds.
It looks good. I might steal some of this to do reporting for some clients - do you mind? -- -------------------------------------------------------------------------- | Stephen Gran | You will be awarded the Nobel Peace | | [EMAIL PROTECTED] | Prize... posthumously. | | http://www.lobefin.net/~steve | | --------------------------------------------------------------------------
pgpneNJrtZcPD.pgp
Description: PGP signature