Daily Perf Improver: Set up BenchmarkDotNet for systematic benchmarking #194
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR establishes the foundational infrastructure for systematic performance benchmarking using BenchmarkDotNet, addressing Round 1 goals from the performance improvement plan (Issue #190).
Performance Improvements
🎯 Foundation Established:
📊 Benchmark Coverage:
unfoldAsync,replicate,mapAsync,chooseAsync)Technical Implementation
New Benchmark Project
tests/FSharp.Control.AsyncSeq.Benchmarks/with proper .NET 8.0 console app setupBenchmark Categories
Usage
Validation
✅ All existing tests pass (175/175)
✅ BenchmarkDotNet infrastructure validated - successfully builds and runs
✅ Proper memory diagnostics enabled for detecting allocation issues
✅ No performance regressions introduced by infrastructure changes
Test Plan
dotnet test -c Releasedotnet build tests/FSharp.Control.AsyncSeq.Benchmarks -c Releasedotnet run --project tests/FSharp.Control.AsyncSeq.Benchmarks -c ReleaseRelated Issues
Commands Used
Web Searches Performed
MCP Function Calls Used
mcp__github__search_issues: Found research issue Daily Perf Improver: Research and Plan #190 and related performance issuesmcp__github__get_issue: Retrieved details for issues Memory leak when unfolding #35, Unexpected iteration performance drop when recursive loops are used. #57, Parallel sequence runs consequentially (non-parallel) #74, Lack of parallelism in AsyncSeq.cache #95mcp__github__search_pull_requests: Verified no conflicting performance PRsmcp__github__list_pull_requests: Checked for existing performance workThis establishes the critical foundation for all future performance work, enabling systematic measurement, regression detection, and optimization validation. Future performance improvements can now be measured accurately with statistical rigor using BenchmarkDotNet.
🤖 Generated with Claude Code