perf: reduce binary size by optimizing panic formatting - #536
Open
fereidani wants to merge 1 commit into
Open
Conversation
fereidani
force-pushed
the
v2_cold_panic
branch
from
September 1, 2026 07:56
f8f7ce5 to
cefe0b0
Compare
alejandro-vaz
self-requested a review
September 1, 2026 13:34
Collaborator
|
what improvements do the benchmarks show?? I'm a bit afraid of these types of changes because they bloat the codebase a lot is there any way we can extract all those |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reduces binary size of users by avoiding inlining of rarely executed panic formatting code, methodology is exactly the same as what is used in rust standard library.
#[cold]hint is also expected to improve the performance slightly by marking panic path unlikely for the compiler.