3 ms·
CSV.open also uses a file handle (and takes a block). So File.open would be redundant. A fun hack is to use the threach library (threaded each) on the CSV obje
by gonyea 11y ago
CSV.open also uses a file handle (and takes a block). So File.open would be redundant.
A fun hack is to use the threach library (threaded each) on the CSV object. Used with JRuby you can run on all cores to quickly process a large file, while keeping memory usage light.