Ah thanks about the Time class. The script I wrote deals with dates, and I was using Date.strptime. Switching to Time.gm increased the speed of the script by 4x.