Skip to content

Improve compilation performance #15

Open
mstange wants to merge 21 commits intojfkthame:masterfrom
mstange:improve-perf
Open

Improve compilation performance #15
mstange wants to merge 21 commits intojfkthame:masterfrom
mstange:improve-perf

Conversation

@mstange
Copy link

@mstange mstange commented Dec 20, 2025

Fixes #13.

Profiles of 10 iterations of hyf_compile with compress==false:
Before: https://share.firefox.dev/4pMrFnE (591 samples)
After: https://share.firefox.dev/4p9B5sz (204 samples)

I captured these profiles using the command cargo build --profile profiling --bin hyf_compile && samply record -r 4000 --iteration-count 10 --reuse-threads ./target/profiling/hyf_compile ~/code/mozilla/intl/locales/en-US/hyphenation/hyph_en_US.dic /tmp/out.hyf

@@ -334,17 +330,13 @@ impl LevelBuilder {
state_data.push(state.repl_cut as u8);
}
// Collect transitions into an array so we can sort them.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, need to remove this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lots of allocations / frees during compilation

1 participant