Skip to content

Commit

Permalink
Target x86-64-v2 (~2% gain), enable thin lto (~1% gain)
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed Mar 25, 2024
1 parent 1ebcae9 commit 6b3e021
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[target.x86_64-unknown-linux-gnu]
# Targetting x86-64-v2 gives a ~2% performance boost while only
# disallowing Intel CPUs older than 2008 and AMD CPUs older than 2011.
# None of those very old CPUs are used in GCP
# (https://cloud.google.com/compute/docs/cpu-platforms). Unfortunately,
# AWS does not seem to disclose the exact CPUs they use.
rustflags = ["-C", "target-cpu=x86-64-v2"]

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ QUESTIONS.txt
.idea
.vscode
.vscode-license
.cargo
deps
qwdata
elastic-search-artifacts
Expand Down
3 changes: 3 additions & 0 deletions quickwit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,6 @@ sasl2-sys = { git = "https://github.com/quickwit-oss/rust-sasl/", rev = "daca921

[profile.dev]
debug = false

[profile.release]
lto = "thin"

0 comments on commit 6b3e021

Please sign in to comment.