P
Pablo Q.
[Note: parts of this message were removed to make it a legal post.]
Hi folks,
Why I'm getting this result? is It due just to this specif problem?
the file has 293858 record, here is some record samples:
"MARCOS, LUIS","547 N LAKE ST","","MUNDELEIN","IL","000000000"
"BALDWIN, T & S","4732 NE 203RD ST","","LAKE FOREST PARK","WA","000000000"
"RYBOLT, C","401 CEDAR DR","","CLINTON","IL","000000000"
"WELDT, KRISTINA","1945 N ORLEANS ST","","MCHENRY","IL","000000000"
.....
CODE
require 'benchmark'
Benchmark.bm do |x|
x.report do
FasterCSV.foreach("data_test/match.csv") do |row|
end
end
end
Benchmark.bm do |x|
x.report do
File.new("data_test/match.csv",'r').each{|line|
row = line.split("\",\"",-1)
row[0].gsub!('"','')
row[a.length-1].gsub!('"','')
}
end
end
RESULTS
user system total real
16.180000 0.740000 16.920000 ( *17.246190*)
user system total real
5.830000 0.120000 5.950000 ( *6.028469*)
is this true?
Hi folks,
Why I'm getting this result? is It due just to this specif problem?
the file has 293858 record, here is some record samples:
"MARCOS, LUIS","547 N LAKE ST","","MUNDELEIN","IL","000000000"
"BALDWIN, T & S","4732 NE 203RD ST","","LAKE FOREST PARK","WA","000000000"
"RYBOLT, C","401 CEDAR DR","","CLINTON","IL","000000000"
"WELDT, KRISTINA","1945 N ORLEANS ST","","MCHENRY","IL","000000000"
.....
CODE
require 'benchmark'
Benchmark.bm do |x|
x.report do
FasterCSV.foreach("data_test/match.csv") do |row|
end
end
end
Benchmark.bm do |x|
x.report do
File.new("data_test/match.csv",'r').each{|line|
row = line.split("\",\"",-1)
row[0].gsub!('"','')
row[a.length-1].gsub!('"','')
}
end
end
RESULTS
user system total real
16.180000 0.740000 16.920000 ( *17.246190*)
user system total real
5.830000 0.120000 5.950000 ( *6.028469*)
is this true?