Skip to content

Header-only coordijk.h#1148

Open
ajfriend wants to merge 88 commits intouber:masterfrom
ajfriend:aj/header-only-coordijk
Open

Header-only coordijk.h#1148
ajfriend wants to merge 88 commits intouber:masterfrom
ajfriend:aj/header-only-coordijk

Conversation

@ajfriend
Copy link
Copy Markdown
Collaborator

@ajfriend ajfriend commented Apr 2, 2026

This is a simple change on top of #1145. This just moves the contents of coordijk.c to a header-only coordijk.h. The ability to inline gives us more speed improvements on indexing:

| Function               |   master |   aj/header-only-coordijk |   Change |
|------------------------|----------|---------------------------|----------|
| latLngToCell           | 0.1969us |                  0.1780us |    -9.6% |
| cellToLatLng           | 0.1304us |                  0.0886us |   -32.1% |
| cellToBoundary         | 0.5790us |                  0.3897us |   -32.7% |
| directedEdgeToBoundary | 0.2994us |                  0.2004us |   -33.1% |
| vertexToLatLng         | 0.1703us |                  0.1223us |   -28.2% |

master=006ba2c73  aj/header-only-coordijk=0da8f75d8  bench=7891697

The above reflects the combined effect of both #1145 and this PR (baseline current master branch).

The effect of just this PR (baseline vec3d-core):

| Function               |   vec3d-core |   aj/header-only-coordijk |   Change |
|------------------------|--------------|---------------------------|----------|
| latLngToCell           |     0.1907us |                  0.1784us |    -6.4% |
| cellToLatLng           |     0.1061us |                  0.0885us |   -16.6% |
| cellToBoundary         |     0.4346us |                  0.3911us |   -10.0% |
| directedEdgeToBoundary |     0.2529us |                  0.2003us |   -20.8% |
| vertexToLatLng         |     0.1459us |                  0.1225us |   -16.0% |

vec3d-core=a06d1687b  aj/header-only-coordijk=98a538313  bench=7891697

@ajfriend ajfriend requested review from dfellis and nrabinowitz April 2, 2026 22:17
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 2, 2026

Coverage Status

coverage: 99.161% (+0.1%) from 99.066% — ajfriend:aj/header-only-coordijk into uber:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants