Benchmarking#410
Open
jeilealr wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Write Benchmarks for Current DS-MPS Implementation
Summary
This PR adds a reproducible benchmarking setup for GSTools using
Airspeed Velocity plus a small complementary
cProfilehelper.The goal is to establish a measurement baseline before optimizing or extending
the DS-MPS implementation. The benchmarks focus on representative GSTools
workflows rather than isolated micro-functions:
The suite can compare the current Cython fallback backend with the Rust backend
from
gstools_core, and it can report both runtime and peak-memory results.What Changed
asv.conf.json.benchmarks/benchmark_backends.py.gstools-cythoninstallation inside ASVasv.macos-openmp.conf.json.benchmarks/README.md.benchmarkoptional dependency extra.Most of the detailed usage instructions, benchmark case explanations, and
interpretation notes are intentionally kept in
benchmarks/README.mdto avoidduplicating the guide in this PR description.
Why ASV and cProfile?
ASV is used for repeatable benchmark results across commits. This makes it
useful for detecting performance regressions and tracking how workflows change
over time. It is also the standard benchmarking tool used by several scientific
Python projects, including NumPy, SciPy, pandas, scikit-image, and Astropy.
cProfileis used for a different purpose: it profiles one selected workflow inthe current checkout and shows where runtime is spent internally. In this PR,
the cProfile helper imports the same benchmark classes used by ASV, so the
profiling cases stay aligned with the benchmark suite.
Initial Observations
The initial benchmark runs show that Rust is generally faster for larger
variogram and kriging workloads. For very small cases, Rust can be similar or
slightly slower because fixed overhead dominates. With one thread, Rust is not
always faster for every SRF case, so the backend comparison is workflow- and
problem-size-dependent.
The cProfile results suggest that the slowest parts of the measured workflows
are mostly inside compiled backend/numerical routines. That means Python-level
cleanup is unlikely to be the main optimization path for these cases. The next
useful optimization work should focus on algorithmic cost reduction and backend
implementation details.
Follow-Up Tasks
share one generalized OpenMP setup.
current migration work is ready to benchmark.