This comment was written before CardList::MoveAllTo was introduced and at a time that CardList::TakeFirst still had usages -- as such, this may be outdated. Running some benchmarks would still be good here, I think. (Particularly to figure out if this is even an area that needs attention!)
(calls ArrayPool::Create(int maxArrayLength, int maxArraysPerBucket))
Some simple benchmarking and tracking of average list lengths, along with free/used;reused/newly allocated stats would be good here. These parameters were arbitrarily chosen by a neural network (read: I made them up) instead of any hard data.
It looks like ArrayPool internally pushes performance information into the event source System.Buffers.ArrayPoolEventSource. I don't know how you'd subscribe yourself to that, but it looks promising.
https://github.com/Fayti1703/BinaryMatrixPlayer/blob/325aa5b86a717b7c4ab76c900aeac7fc75ff0b53/BinaryMatrixEngine/CardList.cs#L7-L14
This comment was written before
CardList::MoveAllTo
was introduced and at a time thatCardList::TakeFirst
still had usages -- as such, this may be outdated. Running some benchmarks would still be good here, I think. (Particularly to figure out if this is even an area that needs attention!)https://github.com/Fayti1703/BinaryMatrixPlayer/blob/325aa5b86a717b7c4ab76c900aeac7fc75ff0b53/BinaryMatrixEngine/CardList.cs#L28-L29
(calls
ArrayPool::Create(int maxArrayLength, int maxArraysPerBucket)
)Some simple benchmarking and tracking of average list lengths, along with free/used;reused/newly allocated stats would be good here. These parameters were arbitrarily chosen by a neural network (read: I made them up) instead of any hard data.