Unreal Engine performance lab
Stop letting the engine design your game.
Let the data design it.
One Unreal Engine game, rebuilt in several architectures and measured the same way. This page grows with every part of the series.
10, 50, 100, then 2,000 enemies. Real time, Shipping builds; at 10 to 100 enemies the panels show game-thread time, at 2,000 the frame rate. The numbers on the video are averages while recording, which costs a little performance; the numbers below come from the benchmark (5 runs each, no recording).
Part 1: the classic three-way
The game is a fork of ActionRoguelike, a well-known Unreal sample built the way Epic teaches: Actors, Components, inheritance, a tick on everything, Behavior Trees, movement components. It is a correct, carefully made teaching project. That is the point: it does everything by the book.
Three versions of the same game:
- Legacy: the original architecture, unchanged.
- Legacy, optimized: profiled and optimized the proper Unreal way, keeping its architecture.
- Data-oriented: every gameplay Actor deleted. The game is plain C-style code: structs in arrays, free functions, one fixed-step simulation loop. Unreal does input, rendering and a window. Three thin engine classes, zero gameplay Actors.
At 2,000 enemies the original can't even keep its population: spawning costs too much, so it holds 1,283 of the 2,000.
What happens as the enemy count grows
Median of 5 runs per point, Shipping builds. Hover or tap for values; the full numbers are in the table below. The horizontal axis is logarithmic.
Frames per second, by enemy count
| Enemies | Legacy | Legacy, optimized | Data-oriented | DoD vs legacy |
|---|---|---|---|---|
| 10 | 110.0 | 105.4 | 109.0 | 0.99× |
| 25 | 104.3 | 100.8 | 106.0 | 1.02× |
| 50 | 99.9 | 96.5 | 103.8 | 1.04× |
| 100 | 72.3 | 91.6 | 100.5 | 1.39× |
| 250 | 24.8 | 55.9 | 95.6 | 3.86× |
| 500 | 12.1 | 43.3 | 90.0 | 7.46× |
| 1,320 | 4.0 | 25.2 | 77.8 | 19.2× |
| 2,000 | 4.1* | 20.1 | 72.5 | 17.8× |
Median of 5 runs. * Holds only 1,283 enemies alive. Largest population that holds 60 FPS: legacy 100, legacy optimized 100, data-oriented 2,000 (the largest tested here; the stress tests come in a later part).
Where the time goes at 2,000 enemies
| Legacy | Legacy, optimized | Data-oriented | |
|---|---|---|---|
| Game thread per frame | 145.3 ms | 41.6 ms | 2.3 ms |
| Render thread per frame | 13.8 ms | 7.7 ms | 2.8 ms |
| GPU per frame | 14.0 ms | 11.5 ms | 12.3 ms |
| Peak memory | 2,143 MB | 1,743 MB | 1,045 MB |
The GPU cost is about the same in all three: drawing 2,000 enemies is not the problem. The problem is what the gameplay framework does on the CPU for every single one of them: an Actor, its components, its tick, its collision and its movement component, for every enemy and every bullet.
Even at 100 enemies
| Legacy | Legacy, optimized | Data-oriented | |
|---|---|---|---|
| Game thread per frame | 9.5 ms | 6.7 ms | 1.2 ms |
| Frames per second | 72.3 | 91.6 | 100.5 |
At 100 enemies every version still runs, so it looks fine. It isn't: the textbook version already spends 8× more game-thread time on the same gameplay, time a real game needs for everything else. At 10 enemies the frame rate is the same in all three because the GPU sets it, but the game thread is still 1.7 ms against 0.9 ms. The tax is there from the first enemy. It just gets louder.
The textbook architecture isn't a starting point you optimize later. It's the problem.
Unreal isn't the bottleneck. Its gameplay framework is.
Nothing here leaves Unreal. The data-oriented version still uses Unreal for rendering, input, audio, the window and the platform layer: the same engine, the same renderer, the same assets. Look at the GPU row above: drawing the frame costs about the same in all three versions.
What changed is who owns the simulation. In the textbook version, the engine's gameplay framework does: every enemy and every bullet is an Actor with components, a tick and a movement component. In the data-oriented version, the game owns its simulation: plain arrays and plain loops, handed to Unreal only to be drawn.
You don't have to abandon Unreal to make a fast game. You have to stop letting its framework design your game. Use the engine as a renderer and a platform layer, and let the data design the rest.
How it was measured
- Machine: a normal gaming PC: Intel i7-12700K (8 performance cores used, efficiency cores unused), AMD Radeon RX 7600, Windows 11, Unreal Engine 5.7.4.
- Builds: Shipping, cooked once per version, 1920×1080, High scalability, vsync off, uncapped.
- Same game: a bot plays every version through the same input path a human uses (move, aim, fire, abilities). 36 of 36 automated parity tests pass on every version.
- Runs: fixed seed per enemy count, population held by respawning, 10 s warm-up then 60 s measured, 5 runs per number with the build order rotated. Presented on screen, never off-screen; presented frames verified with PresentMon.
- Machine kept idle: nothing else compiling or running; every batch logs the running processes.
Coming next
- Epic's own answer: the same game in Mass, Unreal's data-oriented framework. Measured, write-up soon.
- "OOP done right": two lean object-oriented versions, inside and outside Unreal's object model. Measured, write-up soon.
- The potato: 4 cores, low settings, 30 FPS cap. Who actually pays for the architecture. Running.
- Stress: 5,000 to 50,000 enemies. Queued.
- The code: one feature, enemy death, in each architecture, side by side.
- ECS libraries: flecs and EnTT inside Unreal.
Changelog
- 2026-11-17 · Part 1: the classic three-way at 2,000 and 100 enemies, full FPS table.