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

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

Build:
Build:
LAST BUILD BRANCH: justinhwang/forward-gnomonic-opt
DEFAULT BRANCH: master
Ran 18 Jun 2026 04: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 04:16AM UTC coverage: 100.0%. First build
27736586680

Pull #133

github

justinhwang
perf: fold projection trig into precomputed tables and fused IJK descent

Two hot transforms behind nearly every geometry call are reworked.

toVec3 (the inverse gnomonic projection behind CellToLatLng, CellToBoundary,
CellArea*, EdgeLength*, vertex/edge boundaries, and the polygon paths) computed
five transcendental calls per invocation (atan2 + atan + two sin/cos pairs).
Replace them with algebra:
  - cos/sin of the in-plane angle taken directly from the vector (no atan2);
  - per-face azimuth and the Class III rotation folded in via angle-addition
    against precomputed cos/sin tables;
  - the inverse gnomonic via cos(atan r)=1/sqrt(1+r^2), sin(atan r)=r/sqrt(1+r^2)
    (one sqrt, no atan/sin/cos).

toFaceIjkWithInitializedFijk (the forward path behind LatLngToCell,
PolygonToCells, and local-IJ) fuses the per-resolution Class II/III digit
descent so each digit does a single coordIJK normalize, instead of normalizing
the rotated and the translated coordinates separately.

Both transforms are algebraically exact; output differs from C only at the ULP
level, well within the parity suite's 1e-5 relative tolerance. All white-box and
parity tests pass.

benchstat, pure-Go, f5c493f -> toVec3 fold (Apple M3 Max, count=10):

                              │    sec/op    │   sec/op     vs base                │
CellToLatLng-16                  160.4n ± 2%   126.4n ± 1%  -21.20% (p=0.000 n=10)
CellLatLng-16                    160.6n ± 0%   126.4n ± 2%  -21.35% (p=0.000 n=10)
CellToBoundary-16                648.1n ± 1%   438.9n ± 2%  -32.28% (p=0.000 n=10)
CellBoundary-16                  647.2n ± 1%   463.8n ± 3%  -28.35% (p=0.000 n=10)
CellAreaRads2-16                 813.8n ± 0%   631.3n ± 3%  -22.43% (p=0.000 n=10)
CellAreaKm2-16                   814.5n ± 1%   612.9n ± 2%  -24.76% (p=0.000 n=10)
CellAreaM2-16                    823.4n ± 3%   610.4n ± 1%  -25.87% (p=0.000 n=10)
EdgeLengthRads-16                394.0n ± 1%   329.4n ± 3%  -16.38% (p=0.000 n=... (continued)
Pull Request #133: perf: fold projection trig into precomputed tables and fused IJK descent

58 of 58 new or added lines in 2 files covered. (100.0%)

4266 of 4266 relevant lines covered (100.0%)

3090181.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Go- - 27736586680.1 18 Jun 2026 04:27AM UTC 18
100.0
GitHub Action Run
Source Files on build 27736586680
  • Tree
  • List 18
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #133
  • PR Base - justinhwang/paritytest-benchmarks (#27734636814)
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