MarkovJunior icon indicating copy to clipboard operation
MarkovJunior copied to clipboard

Seal every class possible and fix access modifiers.

Open moonheart08 opened this issue 2 years ago • 0 comments

About this PR

Sealed classes have (mostly minor, but present, due to allowing the JIT to directly call functions on a class instead of doing vtable lookups) performance improvements over the default "virtual" (can be derived from & constructable) class. This'll mostly be important for classes that don't see their abstract version used much, the improvement for Nodes and similar is more minor, but present as they can avoid vtable lookups when a function for said node calls another function on said node.

Also fixed access while at it, to ease potentially making this into a library in the future. It'd be very nice to be able to easily use this code in other projects as a nuget package or similar.

moonheart08 avatar Jun 01 '22 20:06 moonheart08