Repository navigation
Conversation
RowDaBoat
force-pushed
the
measured-optimizations
branch
from
September 7, 2026 22:34
a0f44d1 to
8f9b1ac
Compare
RowDaBoat
marked this pull request as ready for review
September 7, 2026 23:36
RowDaBoat
force-pushed
the
benchmark-update
branch
from
September 7, 2026 23:43
0af3c01 to
3bccd5b
Compare
RowDaBoat
force-pushed
the
measured-optimizations
branch
from
September 7, 2026 23:43
4ec0233 to
f6350c2
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Optimize vecs without changing its public API or external contract.
Method
benchmark-updateas the comparison baseline.tests/manycomponents.nimwith-d:ArchetypeWords=2.Optimizations
Direct Meta initialization (
56f479a)New entities write their
Meta.idthrough the already-known archetype slot instead of looking the entity up again through the public write iterator.Cached removal transition (
dd526fd)Immediate component removal computes the destination archetype ID before materializing a component-ID sequence. The sequence is allocated only when that destination archetype must be created. Focused coverage verifies duplicate removal types, reference retention, column order, and pending additions.
Static query component IDs (
36b54ae)Query column setup uses compile-time component IDs after query matching has already handled registration, avoiding repeated builder-registration checks for every matched archetype.
Raw query column pointers (
b89adf0)Query setup obtains component column bases through the erased buffer data pointer instead of taking typed element zero after a length check.
Direct query column indexes (
f6350c2)Query setup reads the archetype column map directly instead of calling
getIndexfor each requested component in every matched archetype.Each optimization was accepted only after its own 15-pair incremental comparison showed a measurable gain and no directional regression.
Cumulative result versus
benchmark-updateAfter rebasing both branches onto the current
mainbenchmark layout, the final tip and baseline were compiled from the same absolute checkout path and compared across 15 alternating matched process pairs.Validation
mainbenchmark names and style.tests/manycomponents.nimpasses with-d:ArchetypeWords=2.