in reply to Re: The indisputable speed of tr///
in thread The indisputable speed of tr///
Did it help? Quite a bit, actually. This was one component in an otherwise quite decent system, written by a coder who was essentially a temp. The file-IO stuff was handled as efficiently as reasonable in Perl and with appropriate error-checking. It's entirely a File-IO type of system.
The operation is only done once, though, and 300 times nothing can still be pretty small.
See, that's just it. We're talking about large chunks of text, handled a line at a time for memory's sake -- so this operation is repeated tens of thousands of times per run, and many thousands of runs per day (many of which are in parallel -- this doesn't slam the processor by any stretch, since we wait mostly on I/O).
Now, the actual performance difference in the app at large was no where near the 30_000% in the demonstration but it was significant, and certainly worth doing. This change alone made roughly a 350% difference, and that was after improving the I/O routine to read and process up to 500 lines of text at a time, instead of one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: The indisputable speed of tr///
by Jenda (Abbot) on Jun 26, 2006 at 23:08 UTC | |
by radiantmatrix (Parson) on Jun 27, 2006 at 14:32 UTC | |
by ikegami (Patriarch) on Jun 27, 2006 at 16:59 UTC | |
by runrig (Abbot) on Jun 27, 2006 at 17:27 UTC | |
by radiantmatrix (Parson) on Jun 28, 2006 at 14:04 UTC | |
by Jenda (Abbot) on Jun 27, 2006 at 17:30 UTC | |
by Hue-Bond (Priest) on Jun 27, 2006 at 18:07 UTC | |
by duff (Parson) on Jun 27, 2006 at 18:32 UTC |