Closed WenmingChan closed 5 years ago
Hey Wenming,
FastCollections use arrays internally. They're faster than List, Hashset, etc. in certain situations because they have less safety checks and have functions that skip garbage collection and iteration (e.g. FastClear).
LS uses FastCollections to significantly speed up high-volume processes like pathfinding.
Sometimes it's easier or faster to just use arrays.
On Monday, September 3, 2018, WenmingChan notifications@github.com wrote:
I wonder to know why there are many Arrays used,For example,LSAgent[] in AgentController.cs and Ability[] in AbilityManager.cs.And why not use FastCollections instead. when should I use FastCollections or arrays?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SnpM/LockstepFramework/issues/163, or mute the thread https://github.com/notifications/unsubscribe-auth/AHXqp4I_MSW2eC9P6vgosIGeI5H6OR8Tks5uXQGegaJpZM4WXWEz .
Thank you!
I wonder to know why there are many Arrays used,For example,LSAgent[] in AgentController.cs and Ability[] in AbilityManager.cs.And why not use FastCollections instead. when should I use FastCollections or arrays?