dishmaker opened PR #14744 from dishmaker:dishmaker/cc_display_once to bytecodealliance:main:
This adds
.join_display(" ")helper trait that usescore::fmt::Display.
Also, using Display paired withformat!is usually faster.
cargo llvm-lines:
- cranelift-codegen: 1720969 -> 1719695 (change:
-0.07%)- cranelift-codegen-meta: 174388 -> 172478 (change
-1.1%)
dishmaker edited PR #14744:
This adds
.join_display(" ")helper trait that usescore::fmt::Display, which cuts few llvm-lines.
Also, using Display paired withformat!is usually faster.
cargo llvm-lines:
- cranelift-codegen: 1720969 -> 1719695 (change:
-0.07%)- cranelift-codegen-meta: 174388 -> 172478 (change
-1.1%)
dishmaker updated PR #14744.
dishmaker edited PR #14744:
This adds
.join_display(" ")helper trait that usescore::fmt::Display, which cuts few llvm-lines.
Also, using Display paired withformat!is usually faster.
cargo llvm-lines:
- cranelift-codegen: 1720969 -> 1719695 (change:
-0.07%)- cranelift-codegen-meta: 174388 -> 172478 (change
-1.1%)Note to reviewers
Similar PR was not accepted in
clap, because "it makes the code less idiomatic".
dishmaker has marked PR #14744 as ready for review.
dishmaker requested wasmtime-compiler-s390x-reviewers for a review on PR #14744.
dishmaker requested alexcrichton for a review on PR #14744.
dishmaker requested wasmtime-compiler-reviewers for a review on PR #14744.
alexcrichton commented on PR #14744:
it makes the code less idiomatic
I'd be inclined to agree with this -- this is a hefty chunk of new code. Can you make a stronger case of why to land this?
dishmaker commented on PR #14744:
stronger case
I don't have.
At first, It looked like a simple improvement. I hoped for like 3+% reduction in llvm-lines.
But given it's such a ergonomic change, and not being in a hot-path I leave it to you, if such tricks are worth adding.
:cross_mark: alexcrichton closed without merge PR #14744.
alexcrichton commented on PR #14744:
Ok, in that case I'm going to close
Last updated: Oct 31 2026 at 23:03 UTC