Further optimize code size #278
No reviewers
Labels
No labels
bug
duplicate
easy
enhancement
help wanted
invalid
question
rfc
structured-logging
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-rust-lang/log!278
Loading…
Reference in a new issue
No description provided.
Delete branch "optimize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I had a look at #276 and thought I could do better!
There basically two areas where an improvement can be found:
PartialOrd::{lt,le,gt,ge}which forward topartial_cmp. So I added versions which perform the desired comparison directly.A main function containing nothing but
warn!("hello world")shrinks from 160 bytes to 98 bytes in x86_64 with this change.Thanks!
@sfackler mind doing a release with this in it? It may actually be a bit of a perf boost as well for the comparisons!
Done!