Matrix operations performance benchmarks
Performance Benchmarks

Benchmark Analysis
Testing the speed of .NET Matrix Library (NML™)

The following tables lists timings in seconds and operations per second for some common matrix operations. They have been produced by the benchmark program that is included in the samples folder.

The machine used was an Intel Quad Core running at 2.4 MHz with 2Gb or RAM capable of running either Windows Vista 32-bit or Windows Vista 64-bit (dual boot).

.NET Matrix Library 4.3 (32-bit)

-------------------------------------------------
|                Multiplication                 |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    2.2670E-004 |    4.4111E+003 |
|        100  |    4.9440E-004 |    2.0227E+003 |
|        250  |    0.0033      |  302.2335      |
|        500  |    0.0142      |   70.4543      |
|       1000  |    0.0817      |   12.2333      |
-------------------------------------------------

-------------------------------------------------
|                Solve A * X = B                |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0.0025      |  400.2241      |
|        100  |    5.6380E-004 |    1.7737E+003 |
|        250  |    0.0017      |  598.0504      |
|        500  |    0.0079      |  126.9358      |
|       1000  |    0.0629      |   15.8982      |
-------------------------------------------------

-------------------------------------------------
|               LU Decomposition                |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    1.0900E-004 |    9.1743E+003 |
|        100  |    2.6810E-004 |    3.7300E+003 |
|        250  |    0.0015      |  656.5988      |
|        500  |    0.0093      |  108.0976      |
|       1000  |    0.0428      |   23.3661      |
-------------------------------------------------

-------------------------------------------------
|               QR Decomposition                |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0.0012      |  856.6778      |
|        100  |    6.2080E-004 |    1.6108E+003 |
|        250  |    0.0024      |  409.6514      |
|        500  |    0.0127      |   78.7185      |
|       1000  |    0.0857      |   11.6689      |
-------------------------------------------------

-------------------------------------------------
|               SVD Decomposition               |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0.0028      |  358.1021      |
|        100  |    0.0064      |  155.8069      |
|        250  |    0.0516      |   19.3709      |
|        500  |    0.2234      |    4.4765      |
|       1000  |    1.2465      |    0.8023      |
-------------------------------------------------

-------------------------------------------------
|                   Inversion                   |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0.0012      |  836.8901      |
|        100  |    9.0310E-004 |    1.1073E+003 |
|        250  |    0.0058      |  171.3238      |
|        500  |    0.0287      |   34.7923      |
|       1000  |    0.1579      |    6.3346      |
-------------------------------------------------

-------------------------------------------------
|  Eigenvalues eigenvectors (Symmetric matrix)  |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0.0017      |  580.0128      |
|        100  |    0.0038      |  264.3894      |
|        250  |    0.0297      |   33.6519      |
|        500  |    0.1691      |    5.9146      |
|       1000  |    1.3545      |    0.7383      |
-------------------------------------------------

-------------------------------------------------
|   Eigenvalues eigenvectors (General matrix)   |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0.0047      |  213.9220      |
|        100  |    0.0185      |   54.0640      |
|        250  |    0.2658      |    3.7622      |
|        500  |    0.7799      |    1.2823      |
|       1000  |    5.4839      |    0.1824      |
-------------------------------------------------

.NET Matrix Library 4.3 (64-bit)

-------------------------------------------------
|                Multiplication                 |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    1,3930E-004 |    7,1788E+003 |
|        100  |    7,3310E-004 |    1,3641E+003 |
|        250  |    0,0031      |  318,6032      |
|        500  |    0,0117      |   85,6597      |
|       1000  |    0,0752      |   13,3026      |
-------------------------------------------------

-------------------------------------------------
|                Solve A * X = B                |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0,0051      |  196,3865      |
|        100  |    5,3880E-004 |    1,8560E+003 |
|        250  |    0,0018      |  549,4807      |
|        500  |    0,0072      |  137,9405      |
|       1000  |    0,0446      |   22,4182      |
-------------------------------------------------

-------------------------------------------------
|               LU Decomposition                |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    9,6500E-005 |    1,0363E+004 |
|        100  |    2,4570E-004 |    4,0700E+003 |
|        250  |    0,0012      |  820,6812      |
|        500  |    0,0065      |  153,5155      |
|       1000  |    0,0425      |   23,5138      |
-------------------------------------------------

-------------------------------------------------
|               QR Decomposition                |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0,0023      |  439,4445      |
|        100  |    6,0400E-004 |    1,6556E+003 |
|        250  |    0,0021      |  481,8348      |
|        500  |    0,0114      |   87,4730      |
|       1000  |    0,0663      |   15,0775      |
-------------------------------------------------

-------------------------------------------------
|               SVD Decomposition               |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0,0040      |  249,3020      |
|        100  |    0,0059      |  168,7280      |
|        250  |    0,0429      |   23,3263      |
|        500  |    0,1842      |    5,4301      |
|       1000  |    0,9317      |    1,0734      |
-------------------------------------------------

-------------------------------------------------
|                   Inversion                   |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0,0026      |  380,4306      |
|        100  |    9,5790E-004 |    1,0440E+003 |
|        250  |    0,0115      |   87,3286      |
|        500  |    0,0254      |   39,4041      |
|       1000  |    0,1537      |    6,5068      |
-------------------------------------------------

-------------------------------------------------
|  Eigenvalues eigenvectors (Symmetric matrix)  |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0,0029      |  342,3954      |
|        100  |    0,0041      |  243,7360      |
|        250  |    0,0259      |   38,6221      |
|        500  |    0,1243      |    8,0428      |
|       1000  |    0,8220      |    1,2165      |
-------------------------------------------------

-------------------------------------------------
|   Eigenvalues eigenvectors (General matrix)   |
-------------------------------------------------
| Matrix Size |       Duration | Operations/sec |
-------------------------------------------------
|         50  |    0,0070      |  142,8592      |
|        100  |    0,0188      |   53,2884      |
|        250  |    0,1510      |    6,6213      |
|        500  |    0,7645      |    1,3081      |
|       1000  |    6,7776      |    0,1475      |
-------------------------------------------------