Coding StandardsPerformance
Performance
Choosing the right data structure and measuring before optimizing.
These standards cover reasoning about algorithmic complexity, picking collection types that match the access pattern, and measuring before trading readability for speed. Apply them whenever choosing a data structure or considering a performance-motivated rewrite.
- Avoid SelectMany + Per-Element Allocation for Grouping/Counting
- Benchmark LINQ Against Manual Loops Before Assuming Either Is Faster
- Choosing Primary Key Types: UUID vs ULID vs Clustered Surrogate
- Model Ordered Work Queues with
PriorityQueue<T> - Pick the Right Collection Type for the Access Pattern
- Reason About and Document Algorithmic Complexity