Skip to content

Commit

Permalink
Working on LTO and PGO optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
WGUNDERWOOD committed Sep 13, 2024
1 parent 99b5cfb commit cfdb644
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ similar = "2.6.0"

[profile.release]
codegen-units = 1
lto = true
5 changes: 3 additions & 2 deletions extra/perf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
echo "Getting performance metrics"
DIR="$(mktemp -d)"
cp -r ../tests/* "$DIR"
cargo build --release
#cargo build --release

calc(){ awk "BEGIN { print ""$*"" }"; }

Expand All @@ -19,7 +19,8 @@ hyperfine --warmup 10 \
--export-csv $TEXFMTFILE \
--command-name "tex-fmt" \
--prepare "cp -r ../tests/* $DIR" \
"../target/release/tex-fmt $DIR/source/* $DIR/target/*"
"../target/x86_64-unknown-linux-gnu/release/tex-fmt $DIR/source/* $DIR/target/*"
#"../target/release/tex-fmt $DIR/source/* $DIR/target/*"

# latexindent
LATEXINDENTFILE="hyperfine-latexindent.csv"
Expand Down
2 changes: 2 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ pkgs.mkShell {
pkgs.cacert
pkgs.cargo-flamegraph
pkgs.cargo-edit
pkgs.cargo-pgo
pkgs.clippy
pkgs.diff-so-fancy
pkgs.hyperfine
pkgs.libllvm
pkgs.poppler_utils
python
pkgs.rustfmt
Expand Down

0 comments on commit cfdb644

Please sign in to comment.