From 6acdae121ca21a31bc15acfb98765310df69883e Mon Sep 17 00:00:00 2001 From: Daily Perf Improver Date: Tue, 21 Oct 2025 03:18:01 +0000 Subject: [PATCH] Add SVD benchmarks to benchmark suite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add comprehensive benchmarks for SVD (Singular Value Decomposition) operations, complementing existing linear algebra benchmarks for QR, LU, Cholesky, and EVD. These benchmarks establish baseline performance metrics for SVD operations across different matrix sizes. Baseline performance measurements: - 10×10: 428.0 μs - 30×30: 1,772.5 μs (1.77 ms) - 50×50: 4,148.3 μs (4.15 ms) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- benchmarks/FsMath.Benchmarks/LinearAlgebra.fs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/benchmarks/FsMath.Benchmarks/LinearAlgebra.fs b/benchmarks/FsMath.Benchmarks/LinearAlgebra.fs index 319d12e..9900343 100644 --- a/benchmarks/FsMath.Benchmarks/LinearAlgebra.fs +++ b/benchmarks/FsMath.Benchmarks/LinearAlgebra.fs @@ -5,7 +5,7 @@ open FsMath open FsMath.Algebra /// -/// Benchmarks for linear algebra operations (QR, LU, Cholesky, EVD). +/// Benchmarks for linear algebra operations (QR, LU, Cholesky, EVD, SVD). /// These operations are fundamental to scientific computing and their performance /// is critical for applications in statistics, machine learning, and numerical analysis. /// @@ -169,3 +169,19 @@ type LinearAlgebraBenchmarks() = [] member _.LeastSquares_50x50() = LinearAlgebra.leastSquares largeMatrix largeVector + + // ============================================ + // SVD (Singular Value Decomposition) Benchmarks + // ============================================ + + [] + member _.SVD_10x10() = + SVD.compute (smallMatrix.toArray2D()) + + [] + member _.SVD_30x30() = + SVD.compute (mediumMatrix.toArray2D()) + + [] + member _.SVD_50x50() = + SVD.compute (largeMatrix.toArray2D())