Daily Perf Improver - Add SVD benchmarks to benchmark suite #79
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 adds comprehensive benchmarks for SVD (Singular Value Decomposition) operations to the existing benchmark suite. This establishes baseline performance metrics for future SVD optimization work and complements the existing linear algebra benchmarks (QR, LU, Cholesky, EVD).
Performance Goal
Goal Selected: Add benchmark infrastructure for SVD (Phase 3, Performance Engineering)
Rationale: Based on the performance plan from Discussion #4, Phase 3 includes linear algebra optimizations. Recent investigations (see discussion comments from 2025-10-17 and 2025-10-20) found that Cholesky and EVD decompositions have algorithmic structures that make SIMD optimization counter-productive. SVD has similar characteristics (iterative convergence-based algorithm with complex branching). Rather than attempting optimization that would likely regress performance, this PR adds benchmark infrastructure to:
Changes Made
Added Benchmarks
File Modified:
benchmarks/FsMath.Benchmarks/LinearAlgebra.fsAdded three SVD benchmarks for different matrix sizes:
SVD_10x10: Small matrix benchmarkSVD_30x30: Medium matrix benchmarkSVD_50x50: Large matrix benchmarkEach benchmark calls
SVD.computeon a randomly initialized matrix, matching the pattern of existing linear algebra benchmarks (QR, LU, Cholesky, EVD).Approach
Performance Measurements
Test Environment
Baseline Results
Key Observations
Replicating the Performance Measurements
To run these benchmarks:
Results are saved to
BenchmarkDotNet.Artifacts/results/in multiple formats.Testing
✅ Build completes successfully with no errors
✅ SVD benchmarks execute correctly
✅ Baseline measurements collected
✅ No changes to core library code - only benchmark additions
✅ Follows existing benchmark patterns and structure
Why No SVD Optimization?
Based on recent investigations documented in Discussion #4:
Cholesky Investigation (2025-10-17):
EVD Investigation (2025-10-20):
SVD Characteristics:
Conclusion: Rather than implementing optimization that would likely regress performance, this PR establishes benchmarking infrastructure for future investigation if beneficial approaches are identified.
Value of This PR
Next Steps
Based on the performance plan from Discussion #4, remaining Phase 3 work includes:
Related Issues/Discussions
Bash Commands Used
Web Searches Performed
None - this work was based on:
🤖 Generated with Claude Code