
ssampath123
Novice
Nov 2, 2011, 10:31 AM
Post #1 of 6
(1694 views)
|
|
Perl code optimization
|
Can't Post
|
|
Hi, I have created a comparison algorithm that will compare for difference between two files and output them. I work with large files with easily 10000+ lines. Initially, I used 1 while loop for filehandle for first file and the tie:File module to place the lines of the second file into array. Now I use the tie module for the first file too. I compare the files by initially sorting the lines based on key columns provided by user, then ignore certain columns provided by users. My comparison works fine but, it take atleast 1 hour to finish. performance is very critical and I would like to minize that time. I am pretty sure the call to the file is slowing down the program. I was wondering if you guys can give suggestions on how I can improve the performance?? \Thanks!
|