perf: implemented fast list with index mapping

This commit is contained in:
2025-10-10 14:56:31 +03:00
parent 28ca343b43
commit 4c542df401
4 changed files with 78 additions and 5 deletions

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
namespace Engine.Core;
@@ -15,7 +14,7 @@ public class BehaviourCollector<T> : IBehaviourCollector<T> where T : class
private readonly Event<IUniverse, IUniverse.UniverseObjectRegisteredArguments>.EventHandler delegateOnUniverseObjectRegistered = null!;
private readonly Event<IUniverse, IUniverse.UniverseObjectUnRegisteredArguments>.EventHandler delegateOnUniverseObjectUnregistered = null!;
protected readonly List<T> behaviours = new(32);
protected readonly FastList<T> behaviours = new(32);
public IUniverse Universe { get; private set; } = null!;