Documentation
¶
Overview ¶
Command csvscan is a complete program: it parses a CSV column of numbers and reports statistics on it, doing both halves with this library.
It is here rather than in the README because it shows the shape of a real use, which is two phases with different characters:
- Finding structure is a byte scan. IndexAll locates every delimiter in one pass and writes their offsets, which is the step a vector unit is genuinely good at — one compare per sixteen bytes rather than a branch per byte.
- Summarising is arithmetic over a slice, where the reductions each make a single pass and none of them allocate.
Run it:
go run ./docs/examples/csvscan
Click to show internal directories.
Click to hide internal directories.