josevalim

josevalim

Creator of Elixir

Hello everyone,

We have just released NimbleCSV which is a small and fast CSV parsing library for Elixir. It allows developers to define their own parsers so we can rely on binary patterns for efficiency reasons. It also supports dumping and data streaming. We hope this will be an excellent companies along side the efforts we have put on GenStage (and GenStage.Flow):

Docs: NimbleCSV v1.3.0 — Documentation
Source: GitHub - dashbitco/nimble_csv: A simple and fast CSV parsing and dumping library for Elixir · GitHub

Showing Posts 1 to 10

andre1sk

andre1sk

Amazing, how do you find the time to do everything? :slight_smile:

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Initial results indicate that NimbleCSV is 10x faster than CSV when parsing from a file stream, and 10x faster than ExCSV when parsing a literal string (ExCSV doesn’t do streams, CSV doesn’t do raw strings).

Will post full results in a bit, along with CSV writing benchmarks.

OvermindDL1

OvermindDL1

Oh that is great timing! I’m just about to need to parse CSV files from another system. :slight_smile:

michalmuskala

michalmuskala

I tried looking what would be the performance difference if the separators weren’t bound at compile-time. The difference looks to be more-or-less 1.6x, which is quite surprising - i though it would be much worse.

The code is here: GitHub - michalmuskala/nimble_csv at no-macro-magic · GitHub

While the difference for decoding is significant, the difference for encoding seems to be completely negligible.

OvermindDL1

OvermindDL1

Just looking at how to use it, it seems you build a module via: nimble_csv/lib/nimble_csv.ex at master · dashbitco/nimble_csv · GitHub

I am curious if there is planned to be a way to use it into an existing module to turn that module into a parser? It would be useful to add helper functions and parsing module all in one without needing to delegate functions otherwise?

Yeah the Beam VM has a lot of interesting things like that. I ended up making a math module about 6 years ago that got pretty fast after a lot of testing, a lot of weird things ended up being fast, and compile-time generation of structures was absolutely necessary for speed.

michalmuskala

michalmuskala

It seems like a relatively bad idea. Each time you would use it you’d generate all those functions leading to code bloat and long compilation times.

OvermindDL1

OvermindDL1

True, though how many projects have many different styles of CSV parsing all at the same time?

ericmj

ericmj

Elixir Core Team

But that’s what the library does now anyway, it’s just hidden behind another macro. Using use would improve composability and you wouldn’t have to pass in the moduledocs as an option.

michalmuskala

michalmuskala

I think I misunderstood the initial question. Yes I think it might make sense to provide a “more traditional” use-based interface.

DianaOlympos

DianaOlympos

You have no idea… Never worked a lot with Perl dev haven’t you ?

Where Next? Top

Trending in Announcing Top

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
rodloboz
I’ve started working on a new library to run SQL queries and do basic business intelligence. Think “Blazer for Elixir.” Currently it fe...
New

Other Trending Topics Top

mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
CodeSync
:microphone: ElixirConf 2026 - Call for Talks is open! We’re heading to Chicago :united_states: :round_pushpin: In person + virtual :d...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews