• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gimli-rs / gimli / 24429584373
90%
master: 89%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 15 Apr 2026 12:17AM UTC
Jobs 1
Files 46
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Apr 2026 12:16AM UTC coverage: 89.532% (+0.005%) from 89.527%
24429584373

push

github

philipc
Move overflow check out of unsigned LEB128 loop

In read::unsigned(), the shift == 63 overflow check ran on every
iteration of the loop despite only being relevant on the 10th (and
final) byte. Move it out by capping the loop with shift >= 63 and
handling the last byte separately after the loop exits.

This has two effects: First, it removes a comparison and conditional
branch from each iteration of the hot loop. Second -- and more
impactful -- it gives the compiler a known upper bound on the iteration
count, which can enable LLVM to fully unroll the loop.

I checked results on two systems, both showing positive outcomes:

System 1:
> leb128 unsigned small   time:   [459.40 ns 460.70 ns 462.23 ns]
>                         change: [−4.9535% −4.4800% −4.0365%] (p = 0.00 < 0.05)
>                         Performance has improved.
> leb128 unsigned large   time:   [104.40 ns 104.57 ns 104.82 ns]
>                         change: [−15.018% −14.476% −13.628%] (p = 0.00 < 0.05)
>                         Performance has improved.
> leb128 u16 small        time:   [461.00 ns 462.73 ns 464.39 ns]
>                         change: [−22.716% −22.316% −21.947%] (p = 0.00 < 0.05)
>                         Performance has improved.
> parse .debug_info expressions
>                         time:   [63.729 µs 63.913 µs 64.141 µs]
>                         change: [−0.8179% +0.5747% +1.9911%] (p = 0.43 > 0.05)
>                         No change in performance detected.
> evaluate .debug_info expressions
>                         time:   [517.71 µs 519.14 µs 520.82 µs]
>                         change: [−1.5918% −0.8249% +0.0344%] (p = 0.04 < 0.05)

System 2:
> leb128 unsigned small   time:   [896.75 ns 902.94 ns 911.08 ns]
>                         change: [−9.8227% −8.8646% −7.9089%] (p = 0.00 < 0.05)
>                         Performance has improved.
> leb128 unsigned large   time:   [164.77 ns 166.96 ns 170.68 ns]
>                         change: [−44.354% −43.3... (continued)

9 of 9 new or added lines in 1 file covered. (100.0%)

5 existing lines in 1 file now uncovered.

25333 of 28295 relevant lines covered (89.53%)

8389.99 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
76.88
0.9% src/read/endian_slice.rs
Jobs
ID Job ID Ran Files Coverage
1 24429584373.1 15 Apr 2026 12:17AM UTC 46
89.53
GitHub Action Run
Source Files on build 24429584373
  • Tree
  • List 46
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3d74b4c2 on github
  • Prev Build on main (#23706805996)
  • Next Build on main (#24709666943)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc