Skip to content

Add ASV benchmarks for MDAnalysis.lib core kernels#5292

Open
Amarendra22 wants to merge 2 commits intoMDAnalysis:developfrom
Amarendra22:benchmark-lib
Open

Add ASV benchmarks for MDAnalysis.lib core kernels#5292
Amarendra22 wants to merge 2 commits intoMDAnalysis:developfrom
Amarendra22:benchmark-lib

Conversation

@Amarendra22
Copy link

@Amarendra22 Amarendra22 commented Mar 8, 2026

Summary

This PR adds ASV benchmarks for several core computational kernels in MDAnalysis.lib.

The following functions are benchmarked:

  • distance_array
  • self_distance_array
  • calc_dihedrals
  • FastNS neighbor search
  • AtomNeighborSearch

These 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_array
  • lib.distances.SelfDistanceArrayBench.time_self_distance_array
  • lib.dihedrals.DihedralBench.time_calc_dihedrals
  • lib.fastns.FastNSBench.time_fastns
  • lib.neighborsearch.NeighborSearchBench.time_neighbor_search

Motivation

The MDAnalysis.lib module 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)

6 5 4 3 2 )

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/

@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.83%. Comparing base (6e837a4) to head (20607e7).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Amarendra22 Amarendra22 force-pushed the benchmark-lib branch 3 times, most recently from 20607e7 to 3f4dbd1 Compare March 9, 2026 05:09
Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be some overlap with potential GSOC projects so I am going to block this PR for the time being.

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.

2 participants