stillwwater / command_terminal

Unity Command Terminal: In-Game Console
MIT License
446 stars 60 forks source link

Use class objects over structs for performance. #20

Closed ghost closed 3 years ago

ghost commented 5 years ago

Structs perform well for instance sizes less than 16 bytes, instance sizes larger than 16 bytes should be a class object. Structs are designed for representing lightweight objects such as points, coords, and colors.

https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/choosing-between-class-and-struct