Skip to content

Performance Relational Components Performance

github-actions[bot] edited this page Jan 26, 2026 · 5 revisions

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.

How to refresh these tables:

  1. Open Unity’s Test Runner (EditMode/PlayMode as appropriate for your setup).
  2. Run RelationalComponentBenchmarkTests.Benchmark inside Tests/Runtime/Performance.
  3. The test logs the tables to the console and rewrites the section that matches the current operating system.

The script executes the benchmark test in batch mode, captures the markdown tables to BenchmarkLogs/RelationalBenchmark.log, and preserves the raw TestResults.xml when -KeepResults is specified.

Windows (Editor/Player)

Last updated 2026-01-12 01:51 UTC on Windows 11 (10.0.26200) 64bit

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 - Single 9,767 5,654,126 0.00x 10,000
Parent - Array 2,916 3,311,542 0.00x 10,000
Parent - List 2,899 4,236,790 0.00x 10,000
Parent - HashSet 2,934 2,871,959 0.00x 10,000
Child - Single 2,672 3,554,134 0.00x 10,000
Child - Array 1,452 2,312,928 0.00x 10,000
Child - List 1,907 2,576,993 0.00x 10,000
Child - HashSet 1,914 1,705,880 0.00x 10,000
Sibling - Single 3,687,340 14,312,500 0.26x 3,690,000
Sibling - Array 5,831 2,491,710 0.00x 10,000
Sibling - List 5,761 3,383,640 0.00x 10,000
Sibling - HashSet 5,827 1,829,998 0.00x 10,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.

Clone this wiki locally