๐Ÿฆ€ I've improved the implementation behind all the string formatting macros in Rust: println!(), panic!(), format!(), write!(), log::info!(), and so on. (That is, everything based on format_args!().) They will compile a bit faster, use a bit less memory while compiling, result in smaller binaries, and produce more efficient code! ๐ŸŽ‰

'Hello world' compiles 3% faster and a few bigger projects like Ripgrep and Cargo compile 1.5% to 2% faster. And those binaries are roughly 2% smaller. ๐ŸŽŠ

This change will be available in Rust Nightly tomorrow, and should ship as part of Rust 1.93.0 in January.

#rustlang

@Mara Awesome! ๐ŸŽ‰

Do you have a link the PR(s) that landed this? I'd love to see what the changes look like ๐Ÿ˜„

New format_args!() and fmt::Arguments implementation by m-ou-se ยท Pull Request #148789 ยท rust-lang/rust

Part of #99012 This is a new implementation of fmt::Arguments. In this implementation, fmt::Arguments is only two pointers in size. (Instead of six, before.) This makes it the same size as a &s...

GitHub
@rtzoeller Thank you very much!