External Publication
Visit Post

Japes: a high troughput ecs. bevy style

jMonkeyEngine Hub April 12, 2026
Source

tltr:

Highly experimental and not battletested at all.

Records as components, annotated methods as systems, struct-of-arrays storage, bytecode-generated iteration loops, dirty-list change detection, and first-class entity relations with automatic reverse indexes.

What 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 direct 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 analysis as a co-designer, not an afterthought.

Stock JDK 26, no Unsafe, no native code.

zzuegg.github.io

japes — Java Archetype-based Parallel Entity System - japes

Java Archetype-based Parallel Entity System — a high-throughput ECS library for the JVM with first-class change detection and tier-1 bytecode generation.

Long story:

I 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.

A few days ago when running some large scale experiments on vibecity where i got stuck i shifted focus back again to the ecs.

Having 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. It started with massive improvements but of course we got diminishing returns on each round.

Today, 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.

Since 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

zzuegg.github.io

One JIT to rule them all - japes

Java Archetype-based Parallel Entity System — a high-throughput ECS library for the JVM with first-class change detection and tier-1 bytecode generation.

is a nice lecture if you are interested in low level java optimization.

Discussion in the ATmosphere

Loading comments...