From: Dave Burt Date: 2004-07-16T23:37:14+09:00 Subject: Re: my ruby code won't go as fast as my perl code Thanks everyone for your input. I'll post back in about a week when I've had have a chance to try some of this: * csv.rb (may well make the program more legible - thanks gabriele renzi) * making sure files aren't all opened and not closed (oops! thanks Nobu Nakada) * binary search (thanks Ernie) * String#<< or interpolation to gather the match-bits (or maybe even string arrays... thanks Denis et. al.) * strscan.rb (thanks Ara T. Howard) I'm using the windows package 1.81 (13), on a P4 running Win XP. The target system, though, is an old crusty box, maybe P1, running Windows NT. Ara, for sample data, your generator does a pretty good job. Here are some stats, in case you're interested: * about 200 files (increasing very slowly; maybe 1 per year) * roughly 1 record per file per hour * oldest files are up to around 4 years old, and around 10MB * that makes records about 300 bytes on average * that makes about 35k records in those oldest files * the records (comma-separated) consist of a date field (DD-MMM-YY HH:MM:SS) and about 20 decimal fields * my test runs are on about 10% of these files.