Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion benchmarks/FsMath.Benchmarks/LinearAlgebra.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open FsMath
open FsMath.Algebra

/// <summary>
/// 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.
/// </summary>
Expand Down Expand Up @@ -169,3 +169,19 @@ type LinearAlgebraBenchmarks() =
[<Benchmark>]
member _.LeastSquares_50x50() =
LinearAlgebra.leastSquares largeMatrix largeVector

// ============================================
// SVD (Singular Value Decomposition) Benchmarks
// ============================================

[<Benchmark>]
member _.SVD_10x10() =
SVD.compute (smallMatrix.toArray2D())

[<Benchmark>]
member _.SVD_30x30() =
SVD.compute (mediumMatrix.toArray2D())

[<Benchmark>]
member _.SVD_50x50() =
SVD.compute (largeMatrix.toArray2D())
Loading