{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreicdt47qq5gut5sfdtyu5e4a5r5s2ne4ah2l62tchkuekauzy3yi5a",
"uri": "at://did:plc:dxjzgxe7cvirxkwfjr2tjspt/app.bsky.feed.post/3mjfve7cibog2"
},
"path": "/t/japes-a-high-troughput-ecs-bevy-style/49550#post_3",
"publishedAt": "2026-04-13T21:04:27.000Z",
"site": "https://hub.jmonkeyengine.org",
"tags": [
"@ForEachPair",
"@System",
"@Read",
"@Write"
],
"textContent": "Last update on the optimization process, since i do not think there is much more to do. As the patterns that worked against escape analysis got clearer it was more mechanical work to look for places the anti patterns are used. the result is:\n\nBenchmark | Entities | B/op | System-loop EA\n---|---|---|---\niterateWithWrite | 10k | **0** | 100% — zero heap allocation\nNBody oneTick | 10k | **0** | 100% — zero heap allocation\nSparseDelta | 10k | 3,214 | ~100% — residual from driver\nRealisticTick | 10k | 11,270 | ~100% — residual from driver\nPredatorPrey @ForEachPair | 500×2k | 34,564 | ~100% — residual from commands/spawn\nParticleScenario | 10k | 75,153 | ~100% — residual from 1% spawn/despawn\nUnifiedDelta | 10k | 295,763 | 89% — residual from spawn/despawn/strip\n\none op is basically a full world.tick()\n\na basic system like:\n\n\n record Position(float x, float y, float z) {}\n record Velocity(float dx, float dy, float dz) {}\n record Mass(float m) {}\n record DeltaTime(float dt) {}\n\n static class IntegrateSystems {\n @System\n void integrate(@Read Velocity vel, @Write Mut<Position> pos, Res<DeltaTime> dt) {\n var p = pos.get();\n var d = dt.get().dt();\n pos.set(new Position(p.x() + vel.dx() * d, p.y() + vel.dy() * d, p.z() + vel.dz() * d));\n }\n }\n\n\nnow gets executed completely allocation free. due to perfect data alignment in the array jit probably is vectorizing the execution since i am processing all 10k entities in 1.8microseconds. (on my cpu that is very close to 1 entity / clock cycle) Could not belive it so i am reading the values back in teardown. I suspected jit eliminates everything. (i am still sceptical)\n\nNext few days i am going to bug search/fix, a storage backend / interface is still missing. then i might even try to upload to central.\n\nUpdated the “One JIT to rule them all” page to remove all the “facts” that later got disproved. So now it is more a collection of stuff that works rather than a progress log",
"title": "Japes: a high troughput ecs. bevy style"
}