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

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

Build:
Build:
LAST BUILD BRANCH: justinhwang/greatcircle
DEFAULT BRANCH: master
Ran 02 Jun 2026 05:03PM UTC
Jobs 1
Files 1
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

02 Jun 2026 05:02PM UTC coverage: 100.0%. Remained the same
26835325248

Pull #121

github

justinhwang
feat: reimplement greatCircle* as pure Go

Eliminate CGo overhead by implementing the haversine formula directly
in Go. Benchstat shows ~66% faster execution and zero allocations.

Before (CGo):

```lang=bash
BenchmarkGreatCircleDistanceRads-16    	19489219	        62.82 ns/op	      32 B/op	       2 allocs/op
BenchmarkGreatCircleDistanceKm-16      	19358064	        62.81 ns/op	      32 B/op	       2 allocs/op
BenchmarkGreatCircleDistanceM-16       	18969169	        63.68 ns/op	      32 B/op	       2 allocs/op
```

After (pure Go):

```lang=bash
BenchmarkGreatCircleDistanceRads-16    	58551271	        20.70 ns/op	       0 B/op	       0 allocs/op
BenchmarkGreatCircleDistanceKm-16      	57732436	        21.12 ns/op	       0 B/op	       0 allocs/op
BenchmarkGreatCircleDistanceM-16       	56447564	        21.64 ns/op	       0 B/op	       0 allocs/op
```

Benchstat:

```lang=bash
                           │   old (CGo)   │         new (pure Go)          │
                           │    sec/op     │   sec/op     vs base           │
GreatCircleDistanceRads-16   62.82n ± 2%   20.70n ± 1%  -67.06% (p=0.000 n=10)
GreatCircleDistanceKm-16     62.81n ± 1%   21.12n ± 2%  -66.37% (p=0.000 n=10)
GreatCircleDistanceM-16      63.68n ± 0%   21.64n ± 2%  -66.01% (p=0.000 n=10)
geomean                      63.10n        21.15n       -66.48%

                           │  old (CGo)  │       new (pure Go)        │
                           │    B/op     │   B/op     vs base         │
GreatCircleDistanceRads-16   32.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
GreatCircleDistanceKm-16     32.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
GreatCircleDistanceM-16      32.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)

                           │  old (CGo)  │       new (pure Go)        │
                           │  allocs/op  │ allocs/op   vs base        │
GreatCircleDistanceRads-16   2.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
GreatCircleDistanceKm-16     2.000 ± 0%   ... (continued)
Pull Request #121: perf: reimplement greatCircle* as pure Go

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

871 of 871 relevant lines covered (100.0%)

284.03 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Go- - 26835325248.1 02 Jun 2026 05:03PM UTC 1
100.0
GitHub Action Run
Source Files on build 26835325248
  • Tree
  • List 1
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #121
  • PR Base - master (#26835208759)
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