Been There, Done That
Worked at a place that had an old bash/sed/awk etc script that took ~2 days to run on a small amt of data, in fact they stopped running it.
I re-wrote in Perl and used a lot(!) more data and got it down to ~1.5 hrs
That's also why you should not keep firing off the same cronjob every minute... My rule of thumb is that if you want that every 5 mins or more frequently, just write a daemon and wait at the bottom of the loop as reqd.
Also stops it tripping over other copies of itself.