Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
austindonisan authored Feb 23, 2024
1 parent 02616f5 commit 88974a1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
clang-17 1brc.c -Wall -Werror -Wno-unused-parameter -std=c17 -march=native -mtune=native -Ofast -o 1brc
#### Buiding
`clang-17 1brc.c -std=c2x -march=native -mtune=native -Ofast -o 1brc`

For optimal ~8 core results:
./1brc measurments.txt 8
AVX2 is required. GCC also works, but its binary is ~15% slower.

#### Running
`./1brc measurments.txt n`

_n_ is the number of threads to use

Work is spread evenly across threads with no rebalancing. If using hypethreading, _n_ must equal the number of available logical cores for best performance. Use `taskset` to limit the available logical cores.

#### Implementation summary
[Fastest known solution: 0.577s (8 core Zen2); C with heavy AVX2](https://github.com/gunnarmorling/1brc/discussions/710)

0 comments on commit 88974a1

Please sign in to comment.