Learn 7 simple tips to optimize your C# application's performance, including avoiding the Garbage Collector, using stack Allocators, and not reusing object references.

3m read timeFrom dev.to
Post cover image
Table of contents
1. Avoid the Garbage Collector2. Use StackAllocators (C# Recycling Allocator)3. Don't Reuse Object References4. Avoid Memory Mapping (for big files/filesystems)5. Avoid Unnecessary Serialization/Deserialization6. JIT away unused methods7. Measure in Production Mode instead of Debug Mode

Sort: