String Processing optimisation
summary
An initial Elixir pipeline that counts words from stdin takes ~120s and 3GB RAM; replacing the map with ETS update_counter yields ~3x speedup, switching split to a string pattern and disable Unicode cuts time to ~21s, reading large chunks instead of streaming drops it to ~15s, and using IO lists plus a larger initial heap trims a bit more; a concurrent version hits ~7s, comparable to Python (8s) and near C baseline.
AI-written summary · about
chapters (19)
- 0:00Intro
- 1:27Who am I
- 1:50Castle
- 2:50The challenge
- 4:23C version
- 4:47Python version
- 5:16Ruby version
- 6:25Audience participation
- 8:13Elixir scripts
- 9:07Elixir counting
- 10:05Maps
- 10:48Split
- 11:46Split Pattern
- 12:29Unicode
- 13:12Faster
- 14:14Read all
- 15:33IO Lists
- 19:33Recap
- 19:56Elixir options








