Benchmarks¶
Here is the performance of Henad measured against other ABM frameworks, on the grid and agent models shipped with Henad. The following common frameworks for ABM are compared:
- MASON 22 - a multiagent simulation library written in Java
- Agents.jl - an agent-based modeling framework in pure Julia
- NetLogo - a multi-agent modeling software
- Mesa - an agent-based modeling framework in Python
- krABMaga - a discrete events simulation engine for agent-based modeling in Rust
All data are tested on one rented machine, with a 12-core AMD Ryzen 9 3900 CPU (24 vCPUs), 94 GB of RAM and an NVIDIA RTX 4090 GPU, at Henad commit 3c7c7e0 on 8 and 9 October 2026.
Every engine ran in the same sweep, with the following population sizes and step counts:
| Model | Population | Steps |
|---|---|---|
| Game of Life, SIR | 64², 128², 256², 512², 1024², 2048², 4096² | 100 |
| Boids | 1k, 3k, 10k, 30k, 100k, 300k, 1M | 100 |
| Ant foraging | 2k, 6k, 20k, 60k, 200k | 200 |
Results¶
In the figures below, "over budget" indicates that the engine took longer than 1000 seconds to run the required repetitions.
Game of Life¶
| engine | 64² | 128² | 256² | 512² | 1024² | 2048² | 4096² |
|---|---|---|---|---|---|---|---|
| Agents.jl | 22.31 | 41.42 | 75.86 | 122.53 | 172.33 | 195.19 | 164.12 |
| Henad, 1 thread | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| Henad, GPU | 2.13 | 1.02 | 0.43 | 0.16 | 0.05 | 0.02 | 0.00 |
| Henad, all cores | 0.90 | 2.01 | 0.68 | 0.47 | 0.40 | 0.37 | 0.29 |
| MASON | 3.79 | 6.52 | 11.32 | 16.38 | 20.46 | 24.91 | 21.31 |
| Mesa | 1248.27 | 2297.34 | 4189.75 | 6827.90 | over budget | not reached | not reached |
| NetLogo | 124.68 | 281.33 | 1082.36 | 2479.28 | 3795.60 | over budget | not reached |
| krABMaga | 22.94 | 41.64 | 73.86 | 101.85 | 129.82 | 151.65 | 129.98 |
SIR¶
| engine | 64² | 128² | 256² | 512² | 1024² | 2048² | 4096² |
|---|---|---|---|---|---|---|---|
| Agents.jl | 1.38 | 1.49 | 1.86 | 2.78 | 4.94 | 5.24 | 5.08 |
| Henad, 1 thread | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| Henad, GPU | 1.27 | 0.30 | 0.09 | 0.03 | 0.01 | 0.01 | 0.01 |
| Henad, all cores | 0.99 | 0.88 | 0.42 | 0.13 | 0.09 | 0.08 | 0.07 |
| MASON | 1.70 | 1.81 | 1.87 | 1.87 | 1.78 | 2.05 | 1.97 |
| Mesa | 170.18 | 171.19 | 183.68 | 199.92 | 215.74 | over budget | not reached |
| NetLogo | 74.12 | 83.70 | 173.05 | 166.85 | 188.36 | over budget | not reached |
| krABMaga | 2.29 | 2.25 | 2.73 | 2.48 | 2.62 | 2.75 | 2.65 |
Boids¶
| engine | 1k | 3k | 10k | 30k | 100k | 300k | 1M |
|---|---|---|---|---|---|---|---|
| Agents.jl | 2.70 | 2.82 | 3.60 | 3.86 | over budget | not reached | not reached |
| Henad, 1 thread | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | over budget |
| Henad, GPU | 0.04 | 0.01 | 0.01 | 0.00 | 0.00 | 0.01 | no baseline |
| Henad, all cores | 0.14 | 0.10 | 0.09 | 0.08 | 0.07 | 0.08 | no baseline |
| MASON | 1.48 | 1.28 | 1.58 | 1.62 | 2.08 | over budget | not reached |
| Mesa | 116.11 | over budget | not reached | not reached | not reached | not reached | not reached |
| NetLogo | 70.99 | 81.04 | over budget | not reached | not reached | not reached | not reached |
| krABMaga | 1.46 | 1.44 | 1.53 | 1.48 | 1.31 | over budget | not reached |
Ant foraging¶
| engine | 2k | 6k | 20k | 60k | 200k |
|---|---|---|---|---|---|
| Agents.jl | 1.28 | 1.31 | 1.44 | 1.88 | 1.90 |
| Henad, 1 thread | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| Henad, GPU | 0.10 | 0.04 | 0.01 | 0.01 | 0.01 |
| Henad, all cores | 1.85 | 1.23 | 0.60 | 0.35 | 0.35 |
| MASON | 2.36 | 2.63 | 2.75 | 3.13 | 3.91 |
| Mesa | 105.19 | 114.20 | 110.73 | 104.58 | over budget |
| NetLogo | 93.05 | 104.77 | 105.21 | 103.68 | over budget |
| krABMaga | 3.13 | 3.28 | 3.12 | 3.07 | 3.00 |
Lines of code¶
How much each model costs to express, counting neither blanks nor comments. Read the column, not the row: Henad's files also declare parameters, statistics, actions and a palette, and NetLogo's hold the scenario setup as well as the rule.
| engine | Game of Life | Boids | SIR | Ant foraging |
|---|---|---|---|---|
| henad | 71 | 291 | 130 | 446 |
| mesa | 40 | 96 | 50 | 148 |
| netlogo | 52 | 128 | 62 | 188 |
| mason | 84 | 176 | 89 | 246 |
| agents_jl | 50 | 115 | 61 | 191 |
| krabmaga | 129 | 257 | 151 | 326 |
Reproducing¶
See benchmarks/ for reproduction scripts and methods.