[P2][ECS] Evaluate archetype component membership and transition costs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
This issue has not been assessed yet.
Description
Problem and goal
Archetype::has and column_index use linear scans; hot structural churn may benefit from a different representation.
Implementation scope
- Benchmark membership and column lookup across 2, 8, 16, 32+ components per archetype.
- Measure transition-edge cache effectiveness during repeated add/remove operations.
- Prototype compact index/bitset only if measured costs justify memory and code complexity.
- Check data layout and cold-start behavior.
Acceptance criteria
- Before/after time and memory measurements documented.
- No additional allocations in fast query iteration unless explicitly justified.
- Existing archetype and structural tests pass.
Relevant code
crates/crabby_ecs/src/storage.rscrates/crabby_ecs/src/world.rs
Dependencies and notes
Research first; no replacement without measured win.
Compatibility: preserve existing public Rust and C/C++ APIs unless an independently approved design explicitly requires a breaking change. Collect correctness results and before/after measurements for performance-oriented changes.
Source audit and first contribution (2026-11-09)
Reviewed against source baseline df5c1d4 and merged implementation PRs through #167. The full issue acceptance criteria are still open; this audit does not mark the task complete. Existing priority is unchanged.
Starting point: Archetype transition caching already exists in storage.rs/world.rs; membership and column lookup still use linear scans.
First slice: Measure membership, column lookup and transition-cache hit rates across component widths before proposing indexes/bitsets.
Dependencies and coordination: Use #132. Distinguish membership lookup from sparse component storage research #166.
Focused Rust-only PRs are welcome; a contributor need not complete this entire issue in one PR or also implement C/C++ bindings and guide chapters. Maintainers coordinate scoped documentation/native follow-ups. Preserve existing compatibility and supply tests/evidence relevant to the slice.
- Dominant language
- Rust
- Stars
- 4
- Forks
- 0
- Avg merge
- 45m
- Merged PRs (30d)
- 199
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ponkoengine/ponko
-
area: ecs bug priority: P2 type: testing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ponkoengine/ponko#321 ·
Maintainers usually reply within 1 day
-
area: rendering bug priority: P2 type: testing
Difficulty 4/5 3-5 days Newbie friendliness 44/100
ponkoengine/ponko#322 ·
Maintainers usually reply within 1 day
-
area: build area: platforms help wanted priority: P3 type: feature
Difficulty 4/5 3-5 days Newbie friendliness 45/100
ponkoengine/ponko#282 ·
Maintainers usually reply within 1 day
-
area: tooling priority: P2 type: feature
Difficulty 5/5 Over a week Newbie friendliness 35/100
ponkoengine/ponko#262 ·
Maintainers usually reply within 1 day
-
area: build documentation help wanted priority: P2 type: feature
Difficulty 4/5 3-5 days Newbie friendliness 45/100
ponkoengine/ponko#246 ·
Maintainers usually reply within 1 day
All issues in ponkoengine/ponko
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
design-data-spec
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
adobe/spectrum-design-data#1744 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
USERID reads /etc/passwd directly instead of looking the user upPossibly taken A pull request linked to this issue is open or already merged. Opendefect
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day