{"id":19017448,"url":"https://github.com/junkdog/entity-system-benchmarks","last_synced_at":"2025-04-23T02:49:08.826Z","repository":{"id":19083861,"uuid":"22311460","full_name":"junkdog/entity-system-benchmarks","owner":"junkdog","description":"microbenchmarks comparing ECS (entity component system) frameworks for java","archived":false,"fork":false,"pushed_at":"2016-10-24T00:36:35.000Z","size":1173,"stargazers_count":36,"open_issues_count":5,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-23T02:49:02.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junkdog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-27T13:23:45.000Z","updated_at":"2025-02-05T13:38:35.000Z","dependencies_parsed_at":"2022-09-25T04:22:10.398Z","dependency_job_id":null,"html_url":"https://github.com/junkdog/entity-system-benchmarks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fentity-system-benchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fentity-system-benchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fentity-system-benchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fentity-system-benchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junkdog","download_url":"https://codeload.github.com/junkdog/entity-system-benchmarks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250360249,"owners_count":21417717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T19:47:03.480Z","updated_at":"2025-04-23T02:49:08.798Z","avatar_url":"https://github.com/junkdog.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## entity-system-benchmarks\n\n## Benchmarks description:\n#### Tested frameworks\n- [artemis-odb](https://github.com/junkdog/artemis-odb) 0.4.0, 0.9.0, 1.0.1, 1.5.0 (prel.)\n- [ashley](https://github.com/libgdx/ashley) 1.6.0\n- [gdx-artemis](https://github.com/apotapov/gdx-artemis) 0.5.0\n- [retanizer](https://github.com/antag99/retinazer) 0.2.0\n\n\n### Benchmarks explained\n- All benchmarks measure throughput; higher score is better.\n- Attempt to be as similar as possible across frameworks.\n- Run with `entityCount`: 1024, 4096, 16384 and 65536.\n- Share the same random seed.\n- Raw, unprocessed results, here: https://github.com/junkdog/entity-system-benchmarks/tree/master/results\n- Additional data:\n  - `OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu1)`\n  - `Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz`\n\n#### Component iteration benchmarks:\n- Have 3 entity systems updating a position component.\n- An Entity Deleter system: each 100th tick an entity is deleted and a new entity is created the next tick.\n- There are 3 types of iteration benchmarks:\n  - **baseline:** position isn't updated, not included in charts.\n  - **plain:** position component is the default component type.\n  - **pooled:** pooling all components.\n\n#### Insert/remove benchmarks:\n- Chooses from up to 144 different entity compositions.\n- Each tick, removes/inserts 1/4 of the total `entityCount`.\n- When creating entities, a random composition is selected.\n  - The composition is randomly chosen, but shared across all frameworks/benchmarks.\n\n#### Add/remove components benchmarks:\n- Have 3 BaselinePositionSystems.\n- Each tick, toggles the Position component for 1/4 all entities.\n  - Entities are chosen from a pre-shuffled list of entity ids.\n- Two types of benchmarks:\n  - **entity_edit:** Toggling achieve by calling entity.edit().create/remove\n  - **transmuter:** Toggles using the [EntityTransmuter][transmuter] class.\n\n [transmuter]: https://github.com/junkdog/artemis-odb/wiki/Entity#entity-transmuters\n\n### Benchmark results\n\nAs usual, writing microbenchmarks is tricky business - take the numbers with a grain of salt.\nThese benchmarks should not be interpreted as benchmarking each framework as a whole, though\nthey aim to give a hint of each framework's performance.\n\n\n#### Things that might concern\n\n- Overall, ashley-realted benchmarks may be improved; I'm not very familiar with\n  the framework.\n- I never got pooling working with Ashley-1.2.0. Ashley-1.0.1:s pooling benchmarks had an\n  error, but considering it's now so old, I'd rather fix the benchmark for the most recent\n  version.\n- artemis-odb's PackedComponent benchmarks only have a single component implementation, skewing\n  the benchmark results in its favor.\n\n#### artemis-odb_fast benchmarks\n\nArtemis-odb-0.7.0 added support for automatically rewriting the generated class files\nof EntitySystems in order to achieve higher performance. The source code itself remains\nidentical. More about it on the artemis-odb wiki: [Hotspot Optimization][fast].\n\n\n\n#### Benchmarks: 4096 entites\n\n ![it4k][it4k] ![ir4k][ir4k] ![arc4k][arc4k]\n\n| ECS                     |  baseline | plain     | pooled    | insert/remove | edit      | transmute |\n|-------------------------|-----------|-----------|-----------|---------------|-----------|-----------|\n| artemis-odb-0.4.0       |  10609.16 |   6673.70 |           |        774.12 |           |           |\n| artemis-odb-0.9.0       |  11776.13 |  10949.46 |  11476.16 |       3219.62 |   5435.99 |   6912.18 |\n| artemis-odb-0.9.0_fast  |  13440.43 |  11988.66 |  12502.18 |       3245.35 |   5566.49 |   7144.00 |\n| artemis-odb-1.0.1       |  12395.24 |  10373.89 |  11563.60 |       3060.74 |   7827.03 |   9362.37 |\n| artemis-odb-1.0.1_fast  |  15000.39 |  11546.26 |  12953.15 |       3172.14 |   7995.48 |  10208.75 |\n| artemis-odb-2.0.0-RC1   |  12442.58 |  11098.03 |  12209.97 |       6217.78 |   8585.09 |  10495.03 |\n| artemis-odb-2.0.0-RC1_fast |  15010.39 |  11920.99 |  13146.79 |       6225.45 |   9274.83 |  11296.83 |\n| artemis-odb-2.0.0-RC2   |  12426.67 |  11093.07 |  12232.79 |       6101.39 |   8692.16 |  10723.12 |\n| artemis-odb-2.0.0-RC2_fast |  15061.05 |  12022.86 |  13247.54 |       6300.21 |   9326.63 |  11568.29 |\n| ashley-1.6.0            |   9621.74 |   4992.19 |           |       1710.13 |           |           |\n| gdx-artemis-0.5.0       |   9974.36 |           |   7545.31 |       1545.58 |           |           |\n| retinazer-0.2.0         |  19965.98 |  10485.84 |           |       8589.60 |  21339.54 |           |\n\n\n#### Benchmarks: 16384 entites\n\n ![it16k][it16k] ![ir16k][ir16k] ![arc16k][arc16k]\n\n| ECS                     |  baseline | plain     | pooled    | insert/remove | edit      | transmute |\n|-------------------------|-----------|-----------|-----------|---------------|-----------|-----------|\n| artemis-odb-0.4.0       |   2613.93 |   2027.73 |           |        156.16 |           |           |\n| artemis-odb-0.9.0       |   2945.44 |   2867.71 |   2871.12 |        519.20 |   1248.99 |   1523.36 |\n| artemis-odb-0.9.0_fast  |   3361.41 |   3115.78 |   3098.69 |        521.04 |   1273.50 |   1578.94 |\n| artemis-odb-1.0.1       |   3111.22 |   2915.28 |   2950.20 |        536.95 |   1831.17 |   2424.73 |\n| artemis-odb-1.0.1_fast  |   3762.55 |   3199.09 |   3292.84 |        541.52 |   2012.89 |   2614.00 |\n| artemis-odb-2.0.0-RC1   |   3052.38 |   3036.99 |   3088.56 |       1495.83 |   2109.25 |   2620.57 |\n| artemis-odb-2.0.0-RC1_fast |   3768.35 |   3256.18 |   3282.56 |       1513.29 |   2299.33 |   2805.50 |\n| artemis-odb-2.0.0-RC2   |   3063.18 |   3025.16 |   3088.51 |       1495.83 |   2201.62 |   2581.02 |\n| artemis-odb-2.0.0-RC2_fast |   3770.17 |   3280.94 |   3280.77 |       1543.03 |   2349.88 |   2817.17 |\n| ashley-1.6.0            |   2357.24 |    747.36 |           |        157.02 |           |           |\n| gdx-artemis-0.5.0       |   2518.07 |           |   2257.00 |        375.60 |           |           |\n| retinazer-0.2.0         |   4989.42 |   2779.12 |           |       1832.26 |   5237.94 |           |\n\n\n#### Benchmarks: 65536 entites\n\n ![it64k][it64k] ![ir64k][ir64k] ![arc64k][arc64k]\n\n| ECS                     |  baseline | plain     | pooled    | insert/remove | edit      | transmute |\n|-------------------------|-----------|-----------|-----------|---------------|-----------|-----------|\n| artemis-odb-0.4.0       |    321.93 |    231.24 |           |         23.06 |           |           |\n| artemis-odb-0.9.0       |    643.59 |    715.33 |    641.39 |         94.49 |    257.62 |    342.33 |\n| artemis-odb-0.9.0_fast  |    837.87 |    778.02 |    779.91 |         93.59 |    266.31 |    353.99 |\n| artemis-odb-1.0.1       |    777.32 |    721.85 |    722.76 |         96.40 |    433.83 |    587.22 |\n| artemis-odb-1.0.1_fast  |    940.23 |    804.48 |    803.49 |         95.85 |    440.08 |    630.28 |\n| artemis-odb-2.0.0-RC1   |    754.81 |    761.89 |    764.03 |        324.07 |    531.41 |    623.48 |\n| artemis-odb-2.0.0-RC1_fast |    942.25 |    798.78 |    818.32 |        334.10 |    570.92 |    688.43 |\n| artemis-odb-2.0.0-RC2   |    755.53 |    743.70 |    747.61 |        325.39 |    546.60 |    642.08 |\n| artemis-odb-2.0.0-RC2_fast |    941.18 |    815.75 |    818.53 |        336.52 |    582.39 |    694.83 |\n| ashley-1.6.0            |    272.72 |     74.12 |           |         12.58 |           |           |\n| gdx-artemis-0.5.0       |    341.71 |           |    374.17 |         67.38 |           |           |\n| retinazer-0.2.0         |   1136.29 |    670.11 |           |        279.42 |   1262.34 |           |\n\n\n#### Benchmarks: 262144 entites\n\n ![it256k][it256k] ![ir256k][ir256k] ![arc256k][arc256k]\n\n| ECS                     |  baseline | plain     | pooled    | insert/remove | edit      | transmute |\n|-------------------------|-----------|-----------|-----------|---------------|-----------|-----------|\n| artemis-odb-0.4.0       |     71.62 |     55.36 |           |          2.24 |           |           |\n| artemis-odb-0.9.0       |    160.87 |    132.16 |    132.82 |         12.82 |     32.40 |     54.80 |\n| artemis-odb-0.9.0_fast  |    209.12 |    159.65 |    153.97 |         13.03 |     31.91 |     55.51 |\n| artemis-odb-1.0.1       |    175.67 |    137.73 |    136.02 |         14.48 |     88.26 |    135.43 |\n| artemis-odb-1.0.1_fast  |    235.38 |    156.37 |    156.06 |         14.56 |     91.62 |    148.32 |\n| artemis-odb-2.0.0-RC1   |    175.42 |    137.92 |    137.77 |         58.08 |    123.32 |    153.13 |\n| artemis-odb-2.0.0-RC1_fast |    235.92 |    145.90 |    145.43 |         62.89 |    124.02 |    159.13 |\n| artemis-odb-2.0.0-RC2   |    177.21 |    138.00 |    136.71 |         63.99 |     98.55 |    151.73 |\n| artemis-odb-2.0.0-RC2_fast |    232.51 |    147.59 |    146.88 |         62.76 |    134.52 |    163.33 |\n| ashley-1.6.0            |     47.45 |     15.78 |           |          0.85 |           |           |\n| gdx-artemis-0.5.0       |     96.69 |           |     75.71 |         12.85 |           |           |\n| retinazer-0.2.0         |    311.30 |    159.43 |           |         26.61 |    282.48 |           |\n\n\n\n [fast]: https://github.com/junkdog/artemis-odb/wiki/Hotspot-Optimization\n [it4k]: http://junkdog.github.io/images/ecs-bench/iteration__4096_entities.png\n [it16k]: http://junkdog.github.io/images/ecs-bench/iteration__16384_entities.png\n [it64k]: http://junkdog.github.io/images/ecs-bench/iteration__65536_entities.png\n [it256k]: http://junkdog.github.io/images/ecs-bench/iteration__262144_entities.png\n [ir4k]: http://junkdog.github.io/images/ecs-bench/insert_remove__4096_entities.png\n [ir16k]: http://junkdog.github.io/images/ecs-bench/insert_remove__16384_entities.png\n [ir64k]: http://junkdog.github.io/images/ecs-bench/insert_remove__65536_entities.png\n [ir256k]: http://junkdog.github.io/images/ecs-bench/insert_remove__262144_entities.png\n [arc4k]: http://junkdog.github.io/images/ecs-bench/add_remove_components__4096_entities.png\n [arc16k]: http://junkdog.github.io/images/ecs-bench/add_remove_components__16384_entities.png\n [arc64k]: http://junkdog.github.io/images/ecs-bench/add_remove_components__65536_entities.png \n [arc256k]: http://junkdog.github.io/images/ecs-bench/add_remove_components__262144_entities.png\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunkdog%2Fentity-system-benchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunkdog%2Fentity-system-benchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunkdog%2Fentity-system-benchmarks/lists"}