Current: Benchmarks allocate MemoryStream per iteration (CompileVbaProjectBenchmark output, CompileMacroBenchmark macro stream) without cleanup, increasing GC pressure across iterations.
Proposed: Track the streams as fields and dispose them in [IterationCleanup], or return byte[]/length instead. Keep MemoryDiagnoser on to verify reduced allocation/GC noise.
Current: Benchmarks allocate
MemoryStreamper iteration (CompileVbaProjectBenchmarkoutput,CompileMacroBenchmarkmacro stream) without cleanup, increasing GC pressure across iterations.Proposed: Track the streams as fields and dispose them in
[IterationCleanup], or returnbyte[]/length instead. KeepMemoryDiagnoseron to verify reduced allocation/GC noise.