Skip to content

ASA calculation performance tweaks - #1148

Open
josemduarte wants to merge 3 commits into
biojava:masterfrom
josemduarte:jd/asa-perf
Open

ASA calculation performance tweaks#1148
josemduarte wants to merge 3 commits into
biojava:masterfrom
josemduarte:jd/asa-perf

Conversation

@josemduarte

Copy link
Copy Markdown
Contributor

The runtime gain should be around 1.2-1.3x. And together with #1147 it is about 1.3-1.5x

Implemented by Claude and fully tested. Output is identical to the previous implementation.

The changes are to replace objects with flat primitive arrays so the hot loops are sequential scans over contiguous memory instead of pointer chases.

Replaces IndexAndDistance object arrays with primitive int[] and double[] arrays in a Neighbors holder, sorted at creation time to eliminate per-atom sort calls and reduce object allocations.
@josemduarte
josemduarte requested a review from sbittrich August 28, 2026 20:59
@josemduarte josemduarte changed the title ASA calculation performance tricks ASA calculation performance tweaks Aug 28, 2026

@sbittrich sbittrich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks

aalhossary added a commit to aalhossary/biojava that referenced this pull request Aug 30, 2026
Covers what is merged since 7.2.6 and what is open and expected to land:
the download and checksum work, the CATH and ECOD fixes, the contact and
ASA performance tweaks, electron density, and the JUnit 5 migration.

Five entries are for pull requests that are still open - biojava#1134, biojava#1147,
biojava#1148, biojava#1150 and biojava#1151 - and should be checked against what actually
merged before the release is tagged.
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