Skip to content

Remove redundant feasibility checks from hot prediction paths - #235

Open
Alexander-Mitrofanov wants to merge 3 commits into
refactor-to-c++23from
perf/ap1-redundant-feasibility
Open

Remove redundant feasibility checks from hot prediction paths#235
Alexander-Mitrofanov wants to merge 3 commits into
refactor-to-c++23from
perf/ap1-redundant-feasibility

Conversation

@Alexander-Mitrofanov

@Alexander-Mitrofanov Alexander-Mitrofanov commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Implements AP-1, the first measured phase-3 optimization from discussion #232, on the current C++23 base.

areComplementary() already enforces nucleotide complementarity and both accessibility predicates. This change removes duplicate direct accessibility checks from hot predictor and seed paths while preserving the existing row-level screens, recurrence traversal, arithmetic, candidate ordering, and accepted base pairs. A focused counting regression proves the default no-bulge seed path no longer repeats those calls.

The originally reviewed source/test change remains byte-identical to commit 56ac5eb. Commit fd55acb integrates the current C++23 base without conflicts, and 0a5cb8a adds the ChangeLog entry requested in review.

Validation

  • scientific parent: 902236560b48e0aa27166b0be42a0bea8e262442
  • candidate head: 0a5cb8a0aade74d18e901f3b0f48cf1627800f76
  • executable optimization source: fd55acb
  • pinned GCC 14.4.0 / Boost 1.85.0 / ViennaRNA 2.7.2 environment
  • clean configure/build and complete IntaRNA tests pass for both immutable references
  • both AP-1 cases have identical raw and canonical output hashes
  • LP workload: 3.493944 +/- 0.015863 s to 3.454898 +/- 0.014861 s (1.011x)
  • noLP workload: 0.750087 +/- 0.011438 s to 0.692586 +/- 0.003439 s (1.083x)
  • mean peak RSS remains within measurement noise

Batch ap1-current-cpp23-base-20260826 uses parent/candidate benchmark IDs c3a4d4509048019964d420c732cfecf116597eaa1d6944a8db83c3a9e0074e44 and 119aaba30a7e6b51d46f2f4b982bc3de1a1c728cf87a689058a8562f3f7120df.

The schema-validated JSON, compressed outputs, and generated report are in benchmark evidence commit 392147c and benchmark PR #3. The older 8bd1676 -> 56ac5eb measurements remain historical evidence and are superseded for acceptance by this current-base batch.

The refreshed C/C++ CI run is green on the exact candidate head: GCC 14 release, GCC 14 debug, and Apple Clang/libc++ release each pass build, install, the complete test suite, independent compilation of every installed public header, and an installed pkg-config consumer. The benchmark repository's validation run is also green.

@martin-raden martin-raden 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.

I have checked and approved all changes.

  • TODO: update "Changelog" file accordingly

and this will be ready to merge

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