in reply to Re: Needed Performance improvement in reading and fetching from a file
in thread Needed Performance improvement in reading and fetching from a file
you first populate an array then run through and print from it
Look again: the OP is indeed --unnecessarily-- populating an array, but he is not looping through it. He indexes into the array in the push.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Needed Performance improvement in reading and fetching from a file
by smiffy (Pilgrim) on Oct 08, 2008 at 06:40 UTC |