{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicqr6s5wreynkym76gwwndbo6ivcelbzelwer5s6j442v7blpad3y",
    "uri": "at://did:plc:dxjzgxe7cvirxkwfjr2tjspt/app.bsky.feed.post/3mjd57awm4sk2"
  },
  "path": "/t/japes-a-high-troughput-ecs-bevy-style/49550#post_1",
  "publishedAt": "2026-04-12T19:37:17.000Z",
  "site": "https://hub.jmonkeyengine.org",
  "tags": [
    "zzuegg.github.io",
    "japes — Java Archetype-based Parallel Entity System - japes",
    "One JIT to rule them all - japes"
  ],
  "textContent": "tltr:\n\n**Highly experimental and not battletested at all.**\n\nRecords as components, annotated methods as systems, struct-of-arrays storage, bytecode-generated iteration loops, dirty-list change detection, and first-class entity relations\nwith automatic reverse indexes.\n\nWhat makes it different: the entire hot path is designed around the JIT compiler. Per-system hidden classes are generated at world build time via java.lang.classfile, emitting\ndirect invokevirtual calls to user methods and primitive array access for SoA fields — giving C2 clean monomorphic call sites to inline through. The library treats escape\nanalysis as a co-designer, not an afterthought.\n\nStock JDK 26, no Unsafe, no native code.\n\nzzuegg.github.io\n\n### japes — Java Archetype-based Parallel Entity System - japes\n\nJava Archetype-based Parallel Entity System — a high-throughput ECS library for the JVM with first-class change detection and tier-1 bytecode generation.\n\nLong story:\n\nI was playing with bevy some time ago and quite liked the no boilerplate like systems. After that i implemented a java version of the basic system. it was slow as hell, but it was working and nearly 100% unit tested.\n\nA few days ago when running some large scale experiments on vibecity where i got stuck i shifted focus back again to the ecs.\n\nHaving the unit tests around i let claude write benchmarks in rust with bevy and in java for my ecs. Then i spent now 3 or 4 days with claude optimizing the hell out of it.\nIt started with massive improvements but of course we got diminishing returns on each round.\n\nToday, quite by accident after a series of regressions i wanted to know the exact reason for the regression and claude found out about the “escape analysis” trick, we reworked large parts of the underlying api to utilize JIT and EA as best we can with quite massive performance improvements.\n\nSince even reviewing java bytecode is above my paygrade i always made sure that claude updates a deep dive section with relevant information. some is outdated by now but\n\nzzuegg.github.io\n\n### One JIT to rule them all - japes\n\nJava Archetype-based Parallel Entity System — a high-throughput ECS library for the JVM with first-class change detection and tier-1 bytecode generation.\n\nis a nice lecture if you are interested in low level java optimization.",
  "title": "Japes: a high troughput ecs. bevy style"
}