-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02616f5
commit 88974a1
Showing
1 changed file
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |