Beatwc

Goofing around to see if we can beatwc in Elixir

View the Project on GitHub bbense/beatwc

Beating System.cmd("wc",["-l", file]) with native Elixir code

This project is an attempt to teach about performance in parsing text files in Elixir by using a silly example that came up on the elixir-lang mailing list. It was a question about parsing the output of a System.cmd call and using that verses just calling File.stream!("file") |> Enum.count

Know the Enemy

Naive File.Stream!

First pass at slurp with :binary functions

File slurping with only NIF functions from :binary

NIF functions from :binary with file chunking

NIF functions from :binary with file chunking and parallel task execution