From: Gerry Wiener Date: 2001-08-16T02:53:00+09:00 Subject: [ruby-talk:19811] Re: how to speed up hash script? Thanks Joe, that helped to cut the run time from 14 seconds down to 11 seconds. The same change to the Python script increased the run time by about a second to 4 seconds. -Gerry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Ruby hashes seem to be much faster if you use a number as a key instead of a string. So maybe: for i in 1...@num_lines @dict[@lines[i][0...@len_date].to_i] = i end -joe