Darryl,

Sunday, March 2, 2003 you wrote:
DK> Good answer,

    Well, I hope it helped.

    Just to demonstrate how seemingly minor details can make such
    large performance differences consider the following 2 programs
    that do exactly the same thing.

    I'm working on my own February logs:
        28 files;
        147,010,916 bytes;
        1,560,832 lines
        
    Each program lists all of the log files in the imail spool
    directory for month 02.  Each then counts the lines in each file
    as well as the bytes and sums the total.  Each program opens the
    file, reads in all lines, and closes.

    I have a Perl script that takes almost 7 minutes to do this.
    That's approximately 222,976 lines per minute or 3,716 lines per
    second.  I'm quite certain I can improve this since my first file
    is processed very quickly and then successive files are much
    slower.

    I have another program however that does exactly the same thing in
    2.65 seconds.  That's 588,993 lines per second.

    Both programs are single threaded and not optimized.

    Kind of makes me want to invest more time on the 2nd one.


Terry Fritts


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

Reply via email to