Open
Description
To align with performance goals, we should identify areas across the entire codebase that could benefit from zero-allocation techniques; for example, avoiding unnecessary byte[]
allocations, or leveraging Span<byte>
.
Tasks
- Audit the codebase for methods that involve unnecessary allocations.
- Identify candidates for refactoring using
Span<T>
,ref struct
, or other low-allocation patterns. - Refactor selectively to preserve readability and maintainability.
- Add benchmarks and tests where applicable.
Acceptance Criteria
- Clear list of refactored areas with justifications.
- Verified functional parity with reduced allocation.
- Benchmark results demonstrate memory or performance improvements.