cartan

Performance

cartan is a Rust-native Riemannian geometry library with Python bindings via PyO3. This section presents systematic benchmarks comparing cartan against geomstats and geoopt across manifold operations and optimisation algorithms.

Headline Results

At dimension $n = 3$, cartan's Python bindings are:

  • 58x faster than geomstats for the exponential map on the sphere
  • 53x faster for the logarithmic map
  • 37x faster for geodesic distance

The native Rust library adds a further constant-factor improvement by eliminating the Python FFI boundary.

Methodology

All benchmarks use:

  • 200 repetitions for geometry microbenchmarks, 20 for optimisation
  • Median + interquartile range (robust to GC pauses and JIT warmup)
  • 5 warmup calls before timing begins
  • Fixed random seed (42) across all libraries
  • CPU-only (no GPU backends)

Full reproduction instructions are in the benchmarks directory.

Sections

Geometry
exp, log, dist, parallel transport
Optimisation
RGD, RCG, Frechet mean
Stochastic
horizontal lift, Stratonovich step, Wishart