Project

General

Profile

Actions

Feature #1981

closed

[PATCH] CSV Parsing Speedup

Added by ender672 (Timothy Elliott) almost 13 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:25038]

Description

=begin
This patch replaces the regex used in the Ruby 1.9 CSV parser with ruby code.

Running all CSV tests (ts_all.rb) is much faster (36% on my machine). Probably because they don't have to rebuild the regex over and over again. I tested on large CSV files and got an average speedup of 23% on my machine.

(James, this patch is improved & faster from the one I emailed to you on 8/21. Putting into this ticket to make it easier to track any changes.)
=end


Files

ruby_19_csv_speedup_01.patch (7.71 KB) ruby_19_csv_speedup_01.patch Patch against current svn (24629) ender672 (Timothy Elliott), 08/23/2009 04:44 AM
csv.rb (80.6 KB) csv.rb Patched csv.rb ender672 (Timothy Elliott), 08/23/2009 04:44 AM
ruby_19_csv_speedup_02.patch (7.71 KB) ruby_19_csv_speedup_02.patch Same patch as before, against r26974 ender672 (Timothy Elliott), 03/20/2010 03:36 AM
csv.rb (80.8 KB) csv.rb Patched lib/csv.rb, r26974 ender672 (Timothy Elliott), 03/20/2010 03:36 AM
check_for_stray_quotes_19.patch (1.1 KB) check_for_stray_quotes_19.patch ender672 (Timothy Elliott), 03/23/2010 04:16 PM
Actions

Also available in: Atom PDF