MR_

POLAND, 2026

Contact
Menu

LAB / MEMORY / ALLOCATION

Object Pooling

Compare construction counts for repeated spawn and release cycles, including the memory retained by a pool.

DEMONSTRATION / DETERMINISTIC MODEL

Operation count02000No pool2000Pooled100
Without pool
2000 constructions
With pool
100 constructions
Retained capacity
100 objects

Construction counts for a sequential spawn / release workload. Pooling retains memory. These counts do not measure CPU time or garbage collection.

Question

How many object constructions can a pool avoid in a repeated workload?

Hypothesis

If objects are released before the next cycle, the same instances can satisfy later requests. A pool avoids repeated construction but retains its capacity in memory.

Setup

Each cycle requests the same number of concurrent objects and releases all of them. Without a pool, every request constructs an object. The pool starts with the selected reserve and expands to fit the maximum demand. It never shrinks.

Interpretation

This model counts construction operations. It does not model Unity Instantiate/Destroy costs, object reset logic, garbage collection, native memory or thread safety. A larger pool can construct and retain more objects than a short workload needs. Fewer constructions do not automatically prove a faster game.

Next measurement

To evaluate an actual game, capture allocation and frame-time traces with a fixed workload, device, Unity version and build configuration.

Methodology & reproducibility

Evidence type
Deterministic model, not a runtime benchmark.
Inputs
The values shown in the controls above. Keep them identical when comparing results.
Hardware & trials
No hardware measurements or repeated timing samples are collected.
Median / p95
Not applicable to calculated outputs. These require a distribution of measured samples.

Use this model to form a hypothesis. To validate it in a project, record the source revision, build configuration, hardware, workload, warm-up and trial count; then compare baseline and changed builds under the same conditions.

← All experiments