Geospatial Benchmarks

March 23, 2026 · View on GitHub

Batch geodesic distance benchmarks comparing NumKong against the geo and geopy libraries for Haversine and Vincenty formulas.

Rust

LibraryPrecisionMP/s
Haversine
numkong::haversinef32 → f32491.98
numkong::haversinef64 → f64149.72
serial baselinef32 → f32137.83
geo::Haversine distancef32 → f32136.96
serial baselinef64 → f6494.33
geo::Haversine distancef64 → f6492.48
Vincenty
numkong::vincentyf32 → f3271.64
serial baselinef32 → f3218.20
numkong::vincentyf64 → f6413.73
serial baselinef64 → f646.47
geo::Vincenty distancef64 → f642.76

Python

LibraryPrecisionMP/s
numkong.haversinef32 → f32444.38
numkong.haversinef64 → f64132.85
numkong.vincentyf32 → f3265.89
numkong.vincentyf64 → f6411.93
geopy.distance.great_circlef64 → f640.47
geopy.distance.geodesicf64 → f640.03

Run It

Rust

# Default 2048 coordinate pairs
cargo bench --bench bench_geospatial --features bench_geospatial

# Smaller 256 coordinate pairs
NUMWARS_DIMS=256 \
cargo bench --bench bench_geospatial --features bench_geospatial

# Focus on one metric
NUMWARS_FILTER="geospatial/haversine/f32" \
cargo bench --bench bench_geospatial --features bench_geospatial

Python

# Run the Python suite
uv run --with numkong,numpy,geopy,tabulate python geospatial/bench.py --count 2048