-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #37083 - nnethercote:uleb128, r=eddyb
Inline read_{un,}signed_leb128 and opaque::Decoder functions. `read_unsigned_leb128` is hot within rustc because it's heavily used during the reading of crate metadata. This commit tweaks its signature (and that of `read_signed_leb128`, for consistency) so it can increment the buffer index directly instead of maintaining its own copy, the change in which is then used by the caller to advance the index. This reduces the instruction count (as measured by Cachegrind) for some benchmarks a bit, e.g. hyper-0.5.0 by 0.7%.
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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