You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it turns out, the Rust compiler uses variable length LEB128 encoded
integers internally. It so happens that they spent a fair amount of
effort micro-optimizing the decoding functionality [0] [1], as it's in
the hot path.
With this change we replace our decoding routines with these optimized
ones. To make that happen more easily (and to gain some base line speed
up), also remove the "shift" return from the respective methods. As a
result of these changes, we see a respectable speed up:
Before:
test util::tests::bench_u64_leb128_reading ... bench: 128 ns/iter (+/- 10)
After:
test util::tests::bench_u64_leb128_reading ... bench: 103 ns/iter (+/- 5)
Gsym decoding, which uses these routines, improved as follows:
main/symbolize_gsym_multi_no_setup
time: [146.26 µs 146.69 µs 147.18 µs]
change: [−7.2075% −5.7106% −4.4870%] (p = 0.00 < 0.02)
Performance has improved.
[0] rust-lang/rust#69050
[1] rust-lang/rust#69157
Signed-off-by: Daniel Müller <deso@posteo.net>
0 commit comments