Skip to content

Execute source-order folds without sorting - #22

Merged
PraneethMerugu merged 1 commit into
mainfrom
codex/source-order-fold-direct-traversal
Sep 17, 2026
Merged

PraneethMerugu merged 1 commit into
mainfrom
codex/source-order-fold-direct-traversal

Conversation

@PraneethMerugu

Copy link
Copy Markdown
Owner

Summary

  • execute source-order folds directly over ascending physical source positions
  • keep canonical folds on the existing compact-and-sort path
  • specialize recurrence only on two durable traversal laws, not ordering callback identities

Evidence

  • focused CPU: 80/80
  • full CPU: 1,917 assertions across 47 testsets
  • focused real Metal: 63/63
  • full real Metal: 568/568 across 27 testsets
  • launches at extents 32/300/301: 21/51/51 to 6/6/6
  • warm allocations: 7,792/77,712/77,712 to 3,472/7,584/7,584 bytes
  • isolated recurrence JET clean; AllocCheck clean; no LocalMath-owned load invalidations

SourceOrder retains exact dense participating ordinals for diagnostics, halt behavior, failure atomicity, empty-input behavior, and CPU/Metal parity. Canonical callable families still share the compacted recurrence MethodInstance.

@PraneethMerugu
PraneethMerugu merged commit dd5d2e0 into main Sep 17, 2026
5 checks passed
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.

1 participant