Skip to content

perf: avoid boxing components into an interface when adding to storage#30

Merged
ragoune merged 2 commits into
masterfrom
perf/storage-avoid-boxing
Jun 28, 2026
Merged

perf: avoid boxing components into an interface when adding to storage#30
ragoune merged 2 commits into
masterfrom
perf/storage-avoid-boxing

Conversation

@ragoune

@ragoune ragoune commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

addComponentsToArchetypeN and copy hold a concrete *ComponentsStorage[T], but went through add(component ComponentInterface), boxing the component into an interface and doing a type assertion on every add. Add a typed addTyped(T) that appends the value directly; the interface add now just delegates to it.

ragoune and others added 2 commits June 28, 2026 12:23
 addComponentsToArchetypeN and copy hold a concrete *ComponentsStorage[T], but
  went through add(component ComponentInterface), boxing the component into an
  interface and doing a type assertion on every add. Add a typed addTyped(T) that
  appends the value directly; the interface add now just delegates to it.
@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.50000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
storage.go 75.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
component.go 66.05% <100.00%> (ø)
storage.go 64.00% <75.00%> (-2.67%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ragoune ragoune merged commit fdfc167 into master Jun 28, 2026
4 checks passed
@ragoune ragoune deleted the perf/storage-avoid-boxing branch June 28, 2026 10:26
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