Skip to content

Relational Component Performance Benchmarks

Relational component attributes ([SiblingComponent], [ParentComponent], [ChildComponent]) remove repetitive GetComponent* code. These benchmarks quantify the runtime cost of calling Assign*Components for common field shapes (single component, array, List<T>, and HashSet<T>) against hand-written lookups.

Numbers below are grouped by operating system. A section reading pending means nobody has run this suite on that platform, not that the attributes are slow there.

Windows (Editor/Player)

Last updated 2026-09-14 05:38 UTC on Windows 11 (10.0.26200).

Numbers capture repeated Assign*Components calls for one second per scenario. Higher operations per second are better.

Operations per second (higher is better)

Scenario Relational Ops/s Manual Ops/s Rel/Manual Iterations
Parent - Single1,239,79510,018,6900.12x1,240,000
Parent - Array746,0564,764,3920.16x750,000
Parent - List802,0407,396,3260.11x810,000
Parent - HashSet777,6603,955,5240.20x780,000
Child - Single665,0795,341,1490.12x670,000
Child - Array293,3493,229,5430.09x300,000
Child - List285,2153,783,1050.08x290,000
Child - HashSet300,2762,001,9010.15x310,000
Sibling - Single4,636,84728,450,4070.16x4,640,000
Sibling - Array1,242,7123,361,1550.37x1,250,000
Sibling - List1,339,6124,176,2730.32x1,340,000
Sibling - HashSet1,260,5222,255,2250.56x1,270,000

macOS

Pending: run the relational component benchmark suite on macOS to capture results.

Linux

Pending: run the relational component benchmark suite on Linux to capture results.

Other Platforms

Pending: run the relational component benchmark suite on the target platform to capture results.

Refreshing these numbers

Run RelationalComponentBenchmarkTests.Benchmark from Unity's Test Runner. It rewrites the section matching the operating system it ran on and leaves the others alone.