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

uber / h3-go / 36494950939
100%

Build:
DEFAULT BRANCH: master
Ran 28 Sep 2026 10:55PM UTC
Jobs 1
Files 19
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

28 Sep 2026 10:52PM UTC coverage: 100.0%. Remained the same
36494950939

push

github

web-flow
perf: value-receiver coordIJK ops and deferred normalize in x/h3go (#142)

Profile GridDistance and GridPath on the pure-Go path. The time was not in
the algorithm but in how the coordIJK helpers compiled: normalize, upAp7,
downAp7 and friends were pointer-receiver mutators, and inlining a
pointer-receiver call marks the receiver address-taken, which pins it to the
stack. Every iteration of the aperture-7 loops in toFaceIjkWithInitializedFijk,
localIjkToCell and faceIJK.toH3 was doing three loads and three stores instead
of working in registers. unitToDigit and the upAp7 pair also sat just above the
inlining budget.

- Convert the coordIJK mutators (normalize, upAp7, upAp7r, downAp7, downAp7r,
  downAp3, downAp3r, toCube, fromCube) to value receivers that return the new
  coordinate, matching add, sub, scale and the rotations. Call sites become
  ijk = ijk.upAp7() or chain directly.
- toFaceIjkWithInitializedFijk normalizes once after the loop instead of once
  per resolution. Both aperture maps send a uniform offset to a uniform offset
  (the all-ones vector is an eigenvector of each), so the result is identical;
  magnitudes stay below 2^32 after 15 resolutions.
- unitToDigit rejects out-of-range components with one unsigned comparison
  each, which brings it under the inlining budget and drops the LUT bounds
  checks.
- faceIJK.toH3 walks the coordinate as a value instead of through a pointer
  into a copy.

Output is unchanged; the cgo parity tests cover every path touched. Because
toFaceIjk sits under most of the API, the win reaches well beyond GridDistance.

benchstat, Go implementation only, ten interleaved runs of each side on an
Apple M3 Max under background load (medians agree with an earlier idle run):

                              │ old (ebee012) │                 new                  │
                              │    sec/op     │    sec/op     vs base                │
GridDistance-16                 130.45n ± 34%   40.02n ±  9%  -69.... (continued)

79 of 79 new or added lines in 3 files covered. (100.0%)

4309 of 4309 relevant lines covered (100.0%)

2903949.97 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Go- - 36494950939.1 28 Sep 2026 10:55PM UTC 19
100.0
GitHub Action Run
Source Files on build 36494950939
  • Tree
  • List 19
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 5d1670d9 on github
  • Prev Build on master (#36480078553)
  • Next Build on master (#36499045753)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc