Repository navigation
perf(exec): polish scale/performance for rank(by="closeness") #503
Description
Activity
coderabbitai commented
on Aug 10, 2026 coderabbitaiboton Aug 10, 2026 – with coderabbitaiMore actions🔗 Related PRs
#485 - test(performance): establish M4 embedded entry baseline (
#334) [merged]
#492 - perf(exec): parallelize PageRank updates deterministically (#343) [open]
#493 - perf(exec): parallelize Node2Vec walk generation (#344) [open]
#494 - perf(exec): parallelize exact cosine KNN by source (#342) [open]
#496 - test(performance): reconcile M4 exit evidence and scale claims (#345) [closed]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.- Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:issue_enrichment: auto_enrich: enabled: false
💬 Have feedback or questions? Drop into our discord!
- added this to the M4: Embedded Performance and Scale for v0.5.x milestone
on Aug 10, 2026 - addedenhancementNew feature or requestNew feature or requestcoreCore source code changesCore source code changestestingTest coverage and testing infrastructureTest coverage and testing infrastructureexecutorChanges to query executorChanges to query executor
on Aug 10, 2026 - added 4 commits that reference this issue
on Aug 11, 2026
Problem
rank(by="closeness")is a shipped public analyst algorithm whose primary cost class isBFS-heavy all-sources closeness. After M4's shared infrastructure (#337/#340/#341) and the first
compute-kernel batch (#342–#344), this algorithm still needs focused scale and
performance polish so large embedded workloads do not leave available CPU/memory
headroom unused—or so remaining serial costs are measured and dispositioned honestly.
Objective
Polish scale and performance for public
rank(by="closeness")(BFS-heavy all-sources closeness) while preserving deterministic ordering, fingerprints, cancellation, resource limits, and structured errors.Debt / regime
rankRequirements
ComputePooland automatic crossover whenindependent work units exist; keep a serial path for one thread and below a
measured crossover. Never use Rayon's process-global pool.
introduce parallel-only graph copies or O(E) HashMap expansion on index hits.
cancellation, work/output limits, and structured errors at
1/2/4/8/automaticconfigurations where parallelism is introduced.
instead polish representation, allocation, early-exit, and evidence—document the
disposition rather than changing bits.
RSS, fingerprint, hardware-specific timing). Timing is never a CI pass/fail gate.
Acceptance Criteria
rank(by="closeness")has an evidence-backed performance disposition(parallel path with measured crossover or explicit serial polish with proof).
oracle at every supported thread configuration that executes.
without partial public results.
BDD Completion Scenarios
Scenario: Independent work uses the private pool when safe
Given a workload above the measured crossover and a multi-thread policy
When
closenessexecutesThen eligible independent work runs on the instance-owned compute pool
And public results match the one-thread oracle.
Scenario: Small work avoids universal parallel tax
Given a small fixture or one-thread policy
When the same invocation runs
Then the serial path is retained
And no pool setup becomes a universal latency tax.
Scenario: Unsafe parallelism is dispositioned, not forced
Given an algorithm whose numeric/order semantics forbid parallel reduction
When this issue closes
Then the serial contract is preserved
And allocation/representation/evidence polish is documented instead.
Non-Goals
Related Issues