Skip to content
Fast erlang csv reader
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
c_src
src
.gitignore
Makefile
README.md
benchmark2.erl
csv_bench.erl
fill.rb
rebar
rebar.config

README.md

CSV reader

This is a fast csv reader for erlang. At least it must be very fast.

Compile

make

Run benchmark

Ruby is required for simple script fill.rb that creates example.csv Target is 300 000 lines and about 70 MB size.

csv_reader$ time wc -l example.csv 
  300001 example.csv

real	0m0.105s
user	0m0.078s
sys	0m0.027s

So it means that we should take at most 200 milliseconds for reading 300 000 lines of CSV in erlang.

But now it takes 4000 milliseconds:

csv_reader$ make bench
./rebar compile
==> csv_reader (compile)
./csv_bench.erl example.csv
Load csv_reader: ok
Load time: 4559

Plain naive reading and parsing in erlang takes ages.

You can’t perform that action at this time.