Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G.E.C.K #412

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

G.E.C.K #412

wants to merge 2 commits into from

Conversation

delaneyj
Copy link
Contributor

Continuing the XKCD meme, and @mlange-42 previous efforts in finding what they want I've made another ECS library for Go.

It's doing code gen to get me the relationship and DSL like features I want. Still early (and don't read too much into benchmarks) but I'm pretty happy.

On a i7-12700H

pkg: github.com/mlange-42/arche/benchmark/competition/add_remove
BenchmarkIterArche-20                      15183             76950 ns/op               0 B/op          0 allocs/op
BenchmarkBuildArche-20                     19006             56851 ns/op           97760 B/op         69 allocs/op
BenchmarkIterArcheGeneric-20               14703             74561 ns/op               0 B/op          0 allocs/op
BenchmarkBuildArcheGeneric-20              28482             47148 ns/op           94688 B/op         54 allocs/op
BenchmarkIterGECK-20                       53185             22509 ns/op              24 B/op          1 allocs/op
BenchmarkBuildGECK-20                      12819            100864 ns/op          118224 B/op         62 allocs/op
pkg: github.com/mlange-42/arche/benchmark/competition/many_components
cpu: 12th Gen Intel(R) Core(TM) i7-12700H
BenchmarkIterArche-20                     145825              8810 ns/op               0 B/op          0 allocs/op
BenchmarkIterArcheGeneric-20               97863             10769 ns/op               0 B/op          0 allocs/op
BenchmarkIterGECK-20                      141927              7695 ns/op               0 B/op          0 allocs/op
pkg: github.com/mlange-42/arche/benchmark/competition/pos_vel
cpu: 12th Gen Intel(R) Core(TM) i7-12700H
BenchmarkIterArche-20                     611773              1977 ns/op               0 B/op          0 allocs/op
BenchmarkBuildArche-20                       855           1500112 ns/op         2682420 B/op      10263 allocs/op
BenchmarkIterArcheGeneric-20              329964              3384 ns/op               0 B/op          0 allocs/op
BenchmarkBuildArcheGeneric-20               3435            525519 ns/op         1114793 B/op         89 allocs/op
BenchmarkIterGECK-20                     1667020               717.0 ns/op             0 B/op          0 allocs/op
BenchmarkBuildGECK-20                        885           1349539 ns/op         1735178 B/op        125 allocs/op

Not sure you want to include as part of your benchmarks but thought @mlange-42 might be interested in an alternative approach. Thank you for you help in the past btw.

PS. I've also added the pathelogical flecs test for archetype vs sparse sets.

upsert 1,024 entities with 10 components with flip rate of 50% in 6.449639ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 2.92µs,    max: 25.842µs (arche)
per entity:     min: 0.00ns,    avg: 0.01ns,    max: 0.05ns

upsert 2,048 entities with 10 components with flip rate of 50% in 4.039248ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 6.526µs,   max: 47.176µs (arche)
per entity:     min: 0.00ns,    avg: 0.01ns,    max: 0.05ns

upsert 4,096 entities with 10 components with flip rate of 50% in 6.109929ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 4.869µs,   max: 18.566µs (arche)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.01ns

upsert 8,192 entities with 10 components with flip rate of 50% in 8.311989ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 7.417µs,   max: 25.452µs (arche)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.01ns

upsert 16,384 entities with 10 components with flip rate of 50% in 16.843569ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 12.004µs,  max: 117.734µs (arche)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.01ns

upsert 32,768 entities with 10 components with flip rate of 50% in 64.670347ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 17.288µs,  max: 80.656µs (arche)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 65,536 entities with 10 components with flip rate of 50% in 236.520945ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 30.959µs,  max: 222.602µs (arche)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.01ns

upsert 131,072 entities with 10 components with flip rate of 50% in 1.160748251s
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 46.992µs,  max: 140.649µs (arche)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 262,144 entities with 10 components with flip rate of 50% in 4.412026751s
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 88.624µs,  max: 284.943µs (arche)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

BenchmarkPathelogicalArche-20                  1         893028615 ns/op



upsert 1,024 entities with 10 components with flip rate of 50% in 369.307µs
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 167ns,     max: 488ns (geck)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 2,048 entities with 10 components with flip rate of 50% in 534.638µs
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 332ns,     max: 1.171µs (geck)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 4,096 entities with 10 components with flip rate of 50% in 1.125094ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 547ns,     max: 857ns (geck)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 8,192 entities with 10 components with flip rate of 50% in 2.954446ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 1.366µs,   max: 20.033µs (geck)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 16,384 entities with 10 components with flip rate of 50% in 6.301182ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 2.252µs,   max: 14.085µs (geck)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 32,768 entities with 10 components with flip rate of 50% in 13.438051ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 4.826µs,   max: 23.61µs (geck)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 65,536 entities with 10 components with flip rate of 50% in 33.333058ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 10.382µs,  max: 94.244µs (geck)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 131,072 entities with 10 components with flip rate of 50% in 52.502449ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 18.955µs,  max: 48.901µs (geck)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

upsert 262,144 entities with 10 components with flip rate of 50% in 106.108007ms
querying for 3 components taking 4096 samples
total:          min:    0s,     avg: 35.179µs,  max: 122.54µs (geck)
per entity:     min: 0.00ns,    avg: 0.00ns,    max: 0.00ns

BenchmarkPathelogicalGECK-20                   1         304506156 ns/op

@delaneyj delaneyj changed the title Geck GECK Mar 22, 2024
@delaneyj delaneyj changed the title GECK G.E.C.K Mar 22, 2024
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 8395150930

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 8253042491: 0.0%
Covered Lines: 6374
Relevant Lines: 6374

💛 - Coveralls

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.

2 participants