How much is the cost of GetScript<T>?

So I was trying to learn flax and found out to spawn prefab, you need PrefabManager.SpawnManger which returned Actor, while in Unity you can get prefab’s T with Instantiate. If I want to get the T, I need to use Actor.GetScript() after spawning the prefab, and keep it in local var/script’s var if reused couple of time.

My question is, how much does it cost compared to Unity’s GetComponent? Let’s say the use case scenario is for spawning bullet projectile, something like the Nails from Quake. Is it less expensive compared to Unity GetComponent ?

I think it’s similar cost of iterating over the list of attached components/scripts.

Hmm, got it. I’ll try to use Object Pooling then. Thanks for the info, appreciate it!