Also, I can't really believe that this I/O bound procedure would in any way be impacted by the number of nanoseconds required to manipulate the dates.
Never underestimate the impact of a large number of subroutine calls.
Given the OP's followup, it seems there's a lot going on in the original code.
-QM
--
Quantum Mechanics: The dreams stuff is made of
| [reply] |
Yes, there is a lot going on. Details on the problem and discussion on solutions are in an earlier post from me:
http://www.perlmonks.org/?node_id=1207429
But, introducing the has range lookup was Terrible for the performance as it meant I had to call a sub, search through about 500 hash items, return if found; AND it had to do this for between 250,000 and 500,000 items each run. If you look at my stats output, you will see this was taking about (edited numbers to reflect actual data) an average of 120 seconds per 1000.
Changing to the array lookup was a HUGE increase in speed knocking the per 1000 time to 5-7 seconds.
With all of the other stuff going on, it is a performance nightmare ... Every little bit counts.
| [reply] |