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

uber / h3-go / 30594622066 / 1
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: justinhwang/remove-h3core
DEFAULT BRANCH: master
Ran 31 Jul 2026 12:54AM UTC
Files 18
Run time 0s
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

31 Jul 2026 12:49AM UTC coverage: 99.764% (-0.2%) from 100.0%
30594622066.1

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

4229 of 4239 relevant lines covered (99.76%)

3188735.06 hits per line

Source Files on job Go- - 30594622066.1
  • Tree
  • List 18
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 30594622066
  • 88d27e3d on github
  • Prev Job for on justinhwang/paritytest-benchmarks (#30594621782.1)
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