Skip to content

Commit c22d6cc

Browse files
committed
Readme: Add information about native optimization
1 parent b36e109 commit c22d6cc

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ These speed tests don't write to an actual disk, but only to the `/dev/null` dev
166166
The read data rates are similar because the algorithm used is exactly the same.
167167

168168

169+
# CPU native optimization
170+
171+
Note that the default [cargo configuration](.cargo/config.toml) supplied with this package sets the Rust compiler option `-Ctarget-cpu=native` to optimize for the best performance on your CPU.
172+
173+
But this means that binaries compiled with this optimizations are non-portable to older CPUs.
174+
If you want portable binaries, then you probably want to remove this optimization option.
175+
176+
169177
# License
170178

171179
Copyright (c) 2020-2025 Michael Büsch <m@bues.ch> and contributors

disktest/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ These speed tests don't write to an actual disk, but only to the `/dev/null` dev
166166
The read data rates are similar because the algorithm used is exactly the same.
167167

168168

169+
# CPU native optimization
170+
171+
Note that the default [cargo configuration](.cargo/config.toml) supplied with this package sets the Rust compiler option `-Ctarget-cpu=native` to optimize for the best performance on your CPU.
172+
173+
But this means that binaries compiled with this optimizations are non-portable to older CPUs.
174+
If you want portable binaries, then you probably want to remove this optimization option.
175+
176+
169177
# License
170178

171179
Copyright (c) 2020-2025 Michael Büsch <m@bues.ch> and contributors

0 commit comments

Comments
 (0)