Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have the tera byte file and want to know to parse the file which one of the below process increases the performance
Method 1:
Open the file, read the line by line and do the some calculation and put the result into the other file and once completed all lines in file, close the file.
Method 2:
Open the file, read all content into the one array variable and close the file after read the each line from array after do the calculation and put the result into the file.
Please tell me which is best way to parse the file , otherwise is there any other way to show best performance.
Sorry, for my bad english
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: performance of File Parsing
by BrowserUk (Patriarch) on Jul 07, 2011 at 08:45 UTC | |
Re: performance of File Parsing
by roboticus (Chancellor) on Jul 07, 2011 at 10:55 UTC | |
by Anonymous Monk on Jul 07, 2011 at 11:26 UTC | |
by sundialsvc4 (Abbot) on Jul 07, 2011 at 12:26 UTC | |
by GrandFather (Saint) on Jul 08, 2011 at 22:52 UTC | |
Re: performance of File Parsing
by pklausner (Scribe) on Jul 07, 2011 at 14:21 UTC | |
Re: performance of File Parsing
by tweetiepooh (Hermit) on Jul 07, 2011 at 11:23 UTC | |
Re: performance of File Parsing
by NiJo (Friar) on Jul 11, 2011 at 18:46 UTC |
Back to
Seekers of Perl Wisdom