Skip to content

Conversation

@BurntSushi
Copy link
Owner

@BurntSushi BurntSushi commented Dec 22, 2025

Using write! unnecessarily when a simple f.write_str would do ends
up generating more LLVM lines on my Biff cargo llvm-lines benchmark.
This PR replaces those uses of write! with Formatter::write_str.

This is only a modest improvement. It only results in trimming a few hundred
LLVM lines on my Biff benchmark. But there's really no reason not to do this,
so this is just a free, albeit small, win.

Using `write!` unnecessarily when a simple `f.write_str` would do ends
up generating more LLVM lines on my Biff `cargo llvm-lines` benchmark.
This PR replaces those uses of `write!` with `Formatter::write_str`.
@BurntSushi BurntSushi merged commit 4d20415 into master Dec 22, 2025
40 checks passed
@BurntSushi BurntSushi deleted the ag/trim-write branch December 22, 2025 20:12
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.

2 participants