Add ASV benchmarks for MDAnalysis.lib core kernels#5292
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5292 +/- ##
===========================================
- Coverage 93.83% 93.83% -0.01%
===========================================
Files 182 182
Lines 22501 22501
Branches 3195 3195
===========================================
- Hits 21114 21113 -1
- Misses 924 925 +1
Partials 463 463 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
20607e7 to
3f4dbd1
Compare
orbeckst
left a comment
There was a problem hiding this comment.
There may be some overlap with potential GSOC projects so I am going to block this PR for the time being.
orbeckst
left a comment
There was a problem hiding this comment.
For all the distance calculation, note that these functions can also work with periodic boundary conditions (PBC, box=... kwarg) and for these boxes it matters if they are orthorhombic or triclinic. The distances should be commensurable with the box sizes.
For the dihedrals it would be nice to not use totally random numbers but generate 4-tuples of atoms for random dihedral angles first.
We also have different backends (see docs).
We would like to parametrize over
- box = None, orthorhombic shape, triclinic shape
- backend = serial, OpenMP, distopia
There was a problem hiding this comment.
There's already a contacts benchmark in develop. Remove this one here.
There was a problem hiding this comment.
This should also automatically resolve the merge conflict that is indicated in the GitHub status checks box.
There was a problem hiding this comment.
This file may not be needed. Remove it and see it it still works.
Summary
This PR adds ASV benchmarks for several core computational kernels in
MDAnalysis.lib.The following functions are benchmarked:
distance_arrayself_distance_arraycalc_dihedralsFastNSneighbor searchAtomNeighborSearchThese functions are widely used across MDAnalysis analysis modules and are performance-critical components. Adding benchmarks helps track performance regressions and evaluate future optimizations.
Benchmarks added
lib.distances.DistanceArrayBench.time_distance_arraylib.distances.SelfDistanceArrayBench.time_self_distance_arraylib.dihedrals.DihedralBench.time_calc_dihedralslib.fastns.FastNSBench.time_fastnslib.neighborsearch.NeighborSearchBench.time_neighbor_searchMotivation
The
MDAnalysis.libmodule contains low-level computational kernels that are called repeatedly by higher-level analysis tools. Benchmarking these functions improves performance monitoring and supports future optimization work.LLM / AI generated code disclosure
LLMs or other AI-powered tools were used in this contribution: No (used for research purpose only)
Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.
📚 Documentation preview 📚: https://mdanalysis--5292.org.readthedocs.build/en/5292/