Changeset 27674

Timestamp:
Jun 13, 2023, 5:57:18 PM (14 months ago)
Author:
wraitii
Message:

Speed up timer update by using Map.forEach

According to JIT profiling on SM 115, using ForEach is faster than iterating.
This is a micro optimisation, maybe 2% faster for OnUpdate, which means we might see an overall improvement < 0.4%.

The reason this is faster here is that Iterating needs to construct an array to store the result, whereas ForEach just uses the values directly. This means this probably doesn't apply to iterating if we don't need both the key/value pair.

Differential Revision: https://code.wildfiregames.com/D5010

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.