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

uber / h3-go / 27734628439
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: justinhwang/forward-gnomonic-opt
DEFAULT BRANCH: master
Ran 18 Jun 2026 03:27AM UTC
Jobs 1
Files 18
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

18 Jun 2026 03:16AM UTC coverage: 99.764%. First build
27734628439

Pull #132

github

justinhwang
test+perf: parity benchmarks and allocation cuts for x/h3go

Add a cgo-vs-pure-Go benchmark suite under x/h3go/paritytest covering every
publicly exposed function and method, each run as "impl=cgo" and "impl=go"
sub-benchmarks so `benchstat -col /impl` reports the per-method delta.

Drive down allocations in the functions the suite flagged as far slower than
the cgo reference, replacing append-growth, per-call disk allocation,
per-level maps, and a pointer-per-arc graph with preallocated/shared buffers
and index-based structures (measured pure-Go before -> after, Apple M3 Max):

- GridDisk:            36 -> 2 allocs,  1610ns -> 837ns  (now -18% vs cgo)
- GridDisksUnsafe:   1283 -> 3 allocs, 49.3us -> 22.3us  (now -24% vs cgo)
- GridDiskDistances:   30 -> 3 allocs, -35% time
- GridRing(Unsafe):     5 -> 2 allocs, -15% time
- PolygonToCells:    2526 -> 98 allocs, -20% time
- CellsToMultiPolygon: 632 -> 188 allocs, -25% time
- CompactCells: rewritten map-based -> sort-based, 10.8us -> 1.70us
  (now -38% vs cgo, was +330%)

Also restore the Class III substrate aperture-7 scaling branch in
faceijk.toVec3 for byte-for-byte fidelity with the C reference (dead code
for H3's own callers, which bump substrate grids to Class II first).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

benchstat -col /impl over the full suite (Apple M3 Max, count=10,
benchtime=100ms). 'go' is this pure-Go package, 'cgo' the v4 reference:

                               │      cgo      │                  go                  │
                               │    sec/op     │    sec/op     vs base                │
LatLngToCell-16                   236.2n ±  7%    223.1n ± 1%   -5.55% (p=0.000 n=10)
LatLngToCellString-16             262.8n ±  0%    245.9n ± 1%   -6.43% (p=0.000 n=10)
LatLngCell-16                     236.2n ±  3%    222.6n ± 1%   -5.76% (p=0.000 n=10)
NewLatLng-16                      9.533n ±  2%    9.468n ± 1%        ~ (p=0.052 n=10)
LatLngStri... (continued)
Pull Request #132: test+perf: parity benchmarks and allocation cuts for x/h3go

191 of 199 new or added lines in 5 files covered. (95.98%)

4229 of 4239 relevant lines covered (99.76%)

3188735.06 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
99.05
-0.95% x/h3go/grid.go
2
99.71
-0.29% x/h3go/faceijk.go
2
98.68
-1.32% x/h3go/hierarchy.go
Jobs
ID Job ID Ran Files Coverage
1 Go- - 27734628439.1 18 Jun 2026 03:27AM UTC 18
99.76
GitHub Action Run
Source Files on build 27734628439
  • Tree
  • List 18
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #132
  • PR Base - justinhwang/remove-h3core (#27731686817)
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