BigMacintosh / Parking

Year 3 Games Project
MIT License
6 stars 0 forks source link

Change Packets To Structs #259

Open liamdalg opened 4 years ago

liamdalg commented 4 years ago

Current Behaviour: the packets are lots of small classes, which will be allocated on the heap, and lead to bad GC.

Desired Behaviour: switch to structs so we use the stack more often. We also might be able to take advantage of the stackalloc keyword with arrays maybe? https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/stackalloc

ghost commented 4 years ago

@ChrisGora has coronavirus