Here’s a clean, senior-level README you can drop directly into GitHub. It’s structured, sharp, and evidence-driven — not bloated.
A controlled Unity performance benchmark comparing how different update architectures scale under identical high-load conditions (up to 10,000 entities + active bullets).
This study isolates the cost of:
- MonoBehaviour per-object
Update() - Centralized manager updates
- ECS (Data-Oriented Design)
Measure how update strategy impacts:
- CPU frame time
- Script execution cost
- GC allocations
- Frame stability
- Scalability limits
All variants run the same scene, same visuals, same behavior — only the update architecture changes.
- 10,000 enemies (red capsules)
- ~1,000–1,500 active bullets (yellow spheres)
- Continuous firing system
- Deterministic grid + shooting pattern
- Direct Instantiate / Destroy (no pooling)
- Same camera, materials, physics, and logic
- Minimal
Update()usage - Passive enemies
- Only bullets update
- Baseline for lifecycle + rendering cost
- 10,000 enemy
Update()calls - ~1,500 bullet
Update()calls - Classic MonoBehaviour scaling
👉 Bottleneck: Script execution (Update dispatch)
- No per-object
Update() - One manager updates all enemies + bullets
- Same GameObjects and visuals
👉 Bottleneck: Transform iteration / memory access
- Enemies and bullets as entities
- Systems handle movement, lifetime, destruction
- Chunk-based iteration
👉 Bottleneck shifts away from scripting entirely
| Variant | Frame Time | Script Cost | Update Calls | Bottleneck |
|---|---|---|---|---|
| A | ~22–30 ms | ~0.5 ms | minimal | Render / Scene |
| B | ~40 ms | ~8.6 ms | 10,000+ | Scripts |
| C | ~32 ms | ~4.3 ms | 1 manager | Transform iteration |
| D | ~9.4 ms | ~0.01 ms | ECS systems | Rendering |
Even trivial logic becomes expensive when executed 10,000 times per frame.
Centralized updates remove engine → script dispatch cost, improving CPU time significantly.
Even without Update(), iterating and writing 10,000 transforms is still expensive.
ECS removes per-object overhead and processes data in chunks, leading to:
- Lower CPU cost
- Better cache locality
- Stable frame times at scale
At scale, performance is dominated not by logic complexity, but by how often and how it is executed.
- MonoBehaviour → high dispatch overhead
- Manager → reduced dispatch, same data cost
- ECS → data-oriented iteration, best scalability
Each variant includes:
- HUD (live stats)
- CPU Timeline
- CPU Hierarchy
- ECS system breakdown (for Variant D)
A/ → Lifecycle Control
B/ → Per-Object Update
C/ → Manager Update
D/ → ECS Implementation
Each contains:
- HUD screenshot
- Profiler Timeline
- Profiler Hierarchy
-
Open project in Unity
-
Load any variant scene (A / B / C / D)
-
Press Play
-
Use HUD:
- Enable Manual Count or Ramp Mode
- Adjust Enemy Count
- Adjust Fire Rate
-
Observe performance + profiler
This study intentionally avoids:
- Object pooling
- GPU optimizations
- Complex AI or animation
- Visual effects
- Randomization
Reason: isolate update architecture only
If you're building large-scale systems in Unity:
- Avoid per-object
Update()at scale - Prefer centralized logic for medium complexity
- Use ECS for high-entity simulations
This is not a synthetic benchmark.
It represents real-world patterns:
- Bullet systems
- Enemy swarms
- Simulation-heavy gameplay
Understanding these trade-offs directly impacts:
- Frame stability
- Device compatibility
- Scalability limits
James De Raja
Senior Real-Time Performance Engineer
Unity Rendering | Frame Pacing | XR Optimization
Portfolio | LinkedIn
MIT (for experimental code only)