Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Mara
Mara
@Mara@hachyderm.io  路  activity timestamp 3 months ago

馃 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

The source of the standard Rust Hello World program with the generated assembly before and after the change.

The before version has 11 instructions and stores 56 bytes on the stack. The after version has 3 instructions and stores no data on the stack.
The source of the standard Rust Hello World program with the generated assembly before and after the change. The before version has 11 instructions and stores 56 bytes on the stack. The after version has 3 instructions and stores no data on the stack.
The source of the standard Rust Hello World program with the generated assembly before and after the change. The before version has 11 instructions and stores 56 bytes on the stack. The after version has 3 instructions and stores no data on the stack.
  • Copy link
  • Flag this post
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About 路 Code of conduct 路 Privacy 路
Bonfire social 路 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Code of Conduct