Skip to content

Optimize component transitions without changing the API - #13

Closed
RowDaBoat wants to merge 2 commits into
mainfrom
codex/optimize-vecs
Closed

RowDaBoat wants to merge 2 commits into
mainfrom
codex/optimize-vecs

Conversation

@RowDaBoat

Copy link
Copy Markdown
Owner

This PR tracks measured performance optimizations to vecs while preserving the external contract and public API.

The branch starts at main (1baee43); runtime code is unchanged at PR creation. Each optimization will be measured with benchs/vecs_bench.nim and committed separately, with frequent pushes.

Baseline validation: all 20 files under tests compile and run on Nim 2.2.8, including manycomponents with -d:ArchetypeWords=2; 170 test cases pass. Benchmark results and final validation will be added as optimizations are completed.

Materialize the removal sequence only when creating a destination archetype. Preserve PackedSet handling in all operation modes.

Validation: 174 tests pass across 21 files; new regression cases also pass on main. Default benchs suite shows 17% faster component removal and 9-10% faster add/remove cycles on Nim 2.2.8 arm64.
@RowDaBoat RowDaBoat closed this Sep 7, 2026
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