Skip to content

documenting benchmarks #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
We have benchmarks, please consider running them: see our README for details.

Our CI tests check formatting automating. If such a test fails, please consider running the bash script:

Expand Down
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,7 @@ abseil : 430.45 MB/s (+/- 2.2 %) 20.52 Mfl
fastfloat : 1042.38 MB/s (+/- 9.9 %) 49.68 Mfloat/s
```

See <https://github.com/lemire/simple_fastfloat_benchmark> for our benchmarking
code.
See the [Benchmarking](#benchmarking) Section for instructions on how to run our benchmarks.

## Video

Expand Down Expand Up @@ -486,6 +485,29 @@ You may directly download automatically generated single-header files:

<https://github.com/fastfloat/fast_float/releases/download/v7.0.0/fast_float.h>

## Benchmarking

The project has its own benchmarks with realistic data inputs. Under Linux or macOS,
you can use it as follows if your system supports C++17:

```
cmake -B build -D FASTFLOAT_BENCHMARKS=ON
cmake --build build
./build/benchmarks/realbenchmark
```

Importantly, by default, the benchmark is built in Release mode.

The instructions are similar under Windows.

Under Linux and macOS, it is recommended to run the benchmarks in a privileged manner to get access
to hardware performance counters. You may be able to do so with the `sudo` command
in some cases:

```
sudo ./build/benchmarks/realbenchmark
```

## Packages

* The fast_float library is part of the [Conan package
Expand Down