Skip to content

Commit 78c0506

Browse files
authored
Merge pull request #79 from fslaborg/perf/add-svd-benchmarks-20251021-031202-0c2ba54-c1af448397f1cba5
Daily Perf Improver - Add SVD benchmarks to benchmark suite
2 parents e18f9a0 + 6acdae1 commit 78c0506

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

benchmarks/FsMath.Benchmarks/LinearAlgebra.fs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ open FsMath
55
open FsMath.Algebra
66

77
/// <summary>
8-
/// Benchmarks for linear algebra operations (QR, LU, Cholesky, EVD).
8+
/// Benchmarks for linear algebra operations (QR, LU, Cholesky, EVD, SVD).
99
/// These operations are fundamental to scientific computing and their performance
1010
/// is critical for applications in statistics, machine learning, and numerical analysis.
1111
/// </summary>
@@ -169,3 +169,19 @@ type LinearAlgebraBenchmarks() =
169169
[<Benchmark>]
170170
member _.LeastSquares_50x50() =
171171
LinearAlgebra.leastSquares largeMatrix largeVector
172+
173+
// ============================================
174+
// SVD (Singular Value Decomposition) Benchmarks
175+
// ============================================
176+
177+
[<Benchmark>]
178+
member _.SVD_10x10() =
179+
SVD.compute (smallMatrix.toArray2D())
180+
181+
[<Benchmark>]
182+
member _.SVD_30x30() =
183+
SVD.compute (mediumMatrix.toArray2D())
184+
185+
[<Benchmark>]
186+
member _.SVD_50x50() =
187+
SVD.compute (largeMatrix.toArray2D())

0 commit comments

Comments
 (0)