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%.
Showing
想要评论请 注册 或 登录