This code is inspired by Prof. Lemire. The Csharp version has been implemented and benchmarked. Check the link for his repository.
Program Name: CSV Parser
Purpose: Given a CSV data file, Parse it and get the lines with specified keyword, e.g. ",Harvard".
License: MIT
You need a C compiler to build.
- For GNU/Linux Distro or other *nix users, the GNU Compiler Collections, known as gcc, is recommended.
- For macOS users, clang is easy to install and use (brew is not needed to install clang on macOS).
- For Microsoft Windows users, mingw-w64, Clang or MSVC is required.
- Use git to clone this code:
git clone https://github.com/zhenrong-wang/csvparser
- Build command example:
gcc csv_parser.c -Ofast -Wall -march=native -o parser
Just run ./parser
, it will parse the example CSV file under ./data/
and print out results.
The code might be buggy, please feel free to report.