Commercial Java library · since 2010
NM Dev
NM Dev is a high-performance Java library of numerical algorithms for solving mathematical and engineering problems. Extensively tested and professionally documented, it helps engineers turn complex mathematics into clear, reusable, object-oriented code.
Mathematical building blocks, designed to fit together: each concept is represented by a class, from matrices and vectors to regression models and partial differential equation solvers. Built-in and user-defined classes share a consistent design, so you can combine simple components into sophisticated solutions without starting from scratch.
Built on numerical software experience dating back to 2010, NM Dev was written from scratch using the lessons learned from SuanShu, its open-source predecessor. The result is a unified, commercially supported library you can integrate into Java applications or use in the S2 computing environment.
Features
8 modulesPerformance benchmarks
13 operations · 12 librariesA complete comparison of matrix operations, decompositions and linear systems across 12 numerical libraries. The results below reproduce the published benchmark values, normalized to SuanShu’s runtime.
Tested on September 24, 2015 using SuanShu 3.3.0, NM Dev’s predecessor. These historical results are not measurements of the current NM Dev release. Performance depends on hardware, versions and workload.
Matrix size · 5000 × 5000
Matrix transpose
19.837×
R’s runtime relative to SuanShu
Apache Commons Math recorded 7.125× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 19.837 |
| Apache Commons Math 3.5 | 7.125 |
| Colt 1.2.0 | 5.021 |
| Parallel Colt 0.10.1 | 2.427 |
| EJML 0.25 | 3.076 |
| JAMA 1.0.3 | 6.424 |
| jblas 1.2.4 | 8.583 |
| JLAPACK 0.8 | 1,924.31 |
| MTJ 1.0.4 | 6.37 |
| ojAlgo 38.2 | 4.749 |
| UJMP 0.3.0 | 2.133 |
Matrix size · 5000 × 5000
Matrix addition
32.482×
R’s runtime relative to SuanShu
Apache Commons Math recorded 3.384× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 32.482 |
| Apache Commons Math 3.5 | 3.384 |
| Colt 1.2.0 | 5.388 |
| Parallel Colt 0.10.1 | 3.697 |
| EJML 0.25 | 4.697 |
| JAMA 1.0.3 | 1.317 |
| jblas 1.2.4 | 12.906 |
| JLAPACK 0.8 | 30.104 |
| MTJ 1.0.4 | 12.468 |
| ojAlgo 38.2 | 12.215 |
| UJMP 0.3.0 | 4.604 |
Matrix size · 5000 × 5000
Matrix scale
21.283×
R’s runtime relative to SuanShu
Apache Commons Math recorded 2.411× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 21.283 |
| Apache Commons Math 3.5 | 2.411 |
| Colt 1.2.0 | 3.514 |
| Parallel Colt 0.10.1 | 2.826 |
| EJML 0.25 | 2.996 |
| JAMA 1.0.3 | 1.066 |
| jblas 1.2.4 | 7.336 |
| JLAPACK 0.8 | 30.89 |
| MTJ 1.0.4 | 7.302 |
| ojAlgo 38.2 | 6.781 |
| UJMP 0.3.0 | 2.656 |
Matrix size · (2000 × 2000) × (2000 × 2000)
Matrix multiplication
14.405×
R’s runtime relative to SuanShu
Apache Commons Math recorded 182.081× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 14.405 |
| Apache Commons Math 3.5 | 182.081 |
| Colt 1.2.0 | 105.403 |
| Parallel Colt 0.10.1 | 9.271 |
| EJML 0.25 | 14.532 |
| JAMA 1.0.3 | 15.817 |
| jblas 1.2.4 | 16.06 |
| JLAPACK 0.8 | 20.007 |
| MTJ 1.0.4 | 13.937 |
| ojAlgo 38.2 | 2.09 |
| UJMP 0.3.0 | 1.572 |
Matrix size · 2000 × 2000
Matrix determinant
1.821×
R’s runtime relative to SuanShu
Apache Commons Math recorded 31.861× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 1.821 |
| Apache Commons Math 3.5 | 31.861 |
| Colt 1.2.0 | 5.002 |
| Parallel Colt 0.10.1 | 5.051 |
| EJML 0.25 | 3.16 |
| JAMA 1.0.3 | 3.106 |
| jblas 1.2.4 | 2.52 |
| JLAPACK 0.8 | 3.379 |
| MTJ 1.0.4 | 48.544 |
| ojAlgo 38.2 | 1.183 |
| UJMP 0.3.0 | 3.151 |
Matrix size · 2000 × 2000
Matrix inverse
4.726×
R’s runtime relative to SuanShu
Apache Commons Math recorded 19.065× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 4.726 |
| Apache Commons Math 3.5 | 19.065 |
| Colt 1.2.0 | 7.723 |
| Parallel Colt 0.10.1 | 8.396 |
| EJML 0.25 | 4.539 |
| JAMA 1.0.3 | 6.246 |
| jblas 1.2.4 | 4.476 |
| JLAPACK 0.8 | 4.876 |
| MTJ 1.0.4 | 4.131 |
| ojAlgo 38.2 | 1.008 |
| UJMP 0.3.0 | 6.313 |
Matrix size · 2000 × 2000
Symmetric matrix inverse
2.566×
R’s runtime relative to SuanShu
Apache Commons Math recorded 7.768× the SuanShu runtime in this test.
Parallel Colt 0.10.1 and ojAlgo 38.2 recorded a lower runtime than SuanShu for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 2.566 |
| Apache Commons Math 3.5 | 7.768 |
| Colt 1.2.0 | 77.602 |
| Parallel Colt 0.10.1 | 0.952 |
| EJML 0.25 | 4.642 |
| JAMA 1.0.3 | 117.715 |
| jblas 1.2.4 | 8.739 |
| JLAPACK 0.8 | 3.147 |
| MTJ 1.0.4 | 5.528 |
| ojAlgo 38.2 | 0.763 |
| UJMP 0.3.0 | 118.859 |
Matrix size · 5000 × 5000
Cholesky decomposition
8.73×
R’s runtime relative to SuanShu
Apache Commons Math recorded 13.778× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 8.73 |
| Apache Commons Math 3.5 | 13.778 |
| Colt 1.2.0 | 13.713 |
| Parallel Colt 0.10.1 | 1.192 |
| EJML 0.25 | 7.94 |
| JAMA 1.0.3 | 11.22 |
| jblas 1.2.4 | 8.848 |
| JLAPACK 0.8 | 12.699 |
| MTJ 1.0.4 | 8.466 |
| ojAlgo 38.2 | 4.755 |
| UJMP 0.3.0 | 11.319 |
Matrix size · 2000 × 2000
LU decomposition
1.871×
R’s runtime relative to SuanShu
Apache Commons Math recorded 32.189× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 1.871 |
| Apache Commons Math 3.5 | 32.189 |
| Colt 1.2.0 | 5.112 |
| Parallel Colt 0.10.1 | 5.11 |
| EJML 0.25 | 3.28 |
| JAMA 1.0.3 | 3.176 |
| jblas 1.2.4 | 2.541 |
| JLAPACK 0.8 | 3.424 |
| MTJ 1.0.4 | 1.728 |
| ojAlgo 38.2 | 1.149 |
| UJMP 0.3.0 | 3.213 |
Matrix size · 2000 × 1000
QR decomposition
2.329×
R’s runtime relative to SuanShu
Apache Commons Math recorded 8.097× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 2.329 |
| Apache Commons Math 3.5 | 8.097 |
| Colt 1.2.0 | 70.712 |
| Parallel Colt 0.10.1 | 1.672 |
| EJML 0.25 | 4.591 |
| JAMA 1.0.3 | 101.534 |
| jblas 1.2.4 | 12.338 |
| JLAPACK 0.8 | 5.739 |
| MTJ 1.0.4 | 4.435 |
| ojAlgo 38.2 | 1.223 |
| UJMP 0.3.0 | 101.888 |
Matrix size · 2000 × 2000
Symmetric eigenvalue decomposition
2.358×
R’s runtime relative to SuanShu
Apache Commons Math recorded 25.56× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 2.358 |
| Apache Commons Math 3.5 | 25.56 |
| Colt 1.2.0 | 45.414 |
| Parallel Colt 0.10.1 | 45.482 |
| EJML 0.25 | 4.82 |
| JAMA 1.0.3 | 45.331 |
| jblas 1.2.4 | 2.534 |
| JLAPACK 0.8 | 3.833 |
| MTJ 1.0.4 | 2.156 |
| ojAlgo 38.2 | 4.273 |
| UJMP 0.3.0 | 45.397 |
Matrix size · 2000 × 2000
Singular value decomposition
2.129×
R’s runtime relative to SuanShu
Apache Commons Math recorded 39.294× the SuanShu runtime in this test.
SuanShu recorded the lowest runtime among the 12 tested libraries for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 2.129 |
| Apache Commons Math 3.5 | 39.294 |
| Colt 1.2.0 | 40.014 |
| Parallel Colt 0.10.1 | 3.445 |
| EJML 0.25 | 3.24 |
| JAMA 1.0.3 | 38.963 |
| jblas 1.2.4 | 6.509 |
| JLAPACK 0.8 | 3.004 |
| MTJ 1.0.4 | 2.056 |
| ojAlgo 38.2 | 2.592 |
| UJMP 0.3.0 | 38.816 |
Matrix size · 2000 × 2000
Solving a linear equality system
6.293×
R’s runtime relative to SuanShu
Apache Commons Math recorded 17.929× the SuanShu runtime in this test.
ojAlgo 38.2 recorded a lower runtime than SuanShu for this operation.
Exact runtime values
| Library | Relative time |
|---|---|
| SuanShu 3.3.0 | 1 |
| R 2.14 | 6.293 |
| Apache Commons Math 3.5 | 17.929 |
| Colt 1.2.0 | 7.531 |
| Parallel Colt 0.10.1 | 8.312 |
| EJML 0.25 | 5.605 |
| JAMA 1.0.3 | 5.857 |
| jblas 1.2.4 | 5.837 |
| JLAPACK 0.8 | 7.276 |
| MTJ 1.0.4 | 5.477 |
| ojAlgo 38.2 | 0.959 |
| UJMP 0.3.0 | 5.952 |
Test environment
- Date:
- September 24, 2015
- Baseline:
- SuanShu 3.3.0
- CPU:
- Dual Intel Xeon X5650, 2.66 GHz · 12 cores total
- Memory:
- 24 GB RAM
- OS:
- Windows 7 Ultimate, 64-bit
- JVM:
- Oracle Java HotSpot 64-bit Server 1.8.0_25
Integration
High-performance numerical computing, in your application.
Plus a suite of high-performance optimization algorithms.
Maven
NM Dev is deployed in NM's repository. Add to the <repositories> section of your pom.xml:
<repository>
<id>nm-repo</id>
<name>NM maven repository</name>
<url>https://repo.nm.dev/repository/maven-public/</url>
<layout>default</layout>
</repository>Then in <dependencies>:
<dependency>
<groupId>dev.nm</groupId>
<artifactId>nmdev</artifactId>
<version>1.2.4</version>
</dependency>Need extra functions or more speed? We tailor NM Dev as a consulting project.
Licensing
Academic
- BASIC
- OPTIM
- STATS
For Qualified Academic Users: the BASIC, OPTIM and STATS packages.
I am a student →Commercial
- BASIC
- OPTIM
- STATS
- O/PDE
- EVT
Run selected modules on a machine permanently.
I am a professional →Books
Learn numerical programming in Java.
Our books teach math and numerical programming in Java with NM Dev / SuanShu, with plenty of examples on GitHub.
Trusted by universities, funds and research labs across Asia, Europe and the Americas
Our customers
Hong Kong, China
- Rongtong Global Investment Limited
- Dr. Stanley Ho Medical Development Foundation
- Chorys Limited
Beijing, China
- 智速科技有限公司
- 北京大学
- 中国人民大学
Shanghai, China
- 上海简雍资产管理有限公司
- 中国科学院上海生命科学研究院
Shenzhen, China
- 正前方金服
Taiwan, China
- National Chiao Tung University
- National Taiwan University
Singapore
- Call Levels
- Robust Tech House
- Agency for Science Technology and Research
Indonesia
- BINUS University International
Vietnam
- Saigon University
India
- Dynamic Levels
- National Atmospheric Research Laboratory, Government of India
- Supercomputer Education and Research Centre
- Computer Science, Indian Institute of Science
Switzerland
- Argentière Capital AG
Israel
- Tel Aviv University
Italy
- PricewaterhouseCoopers
- ERG Services SpA
Spain
- Universidad Carlos III de Madrid
Denmark
- Applied Crypto Aps
Norway
- Norges teknisk-naturvitenskapelige universitet
Sweden
- Uppsala University
Poland
- Jagiellonian University
- Politechnika Świętokrzyska
United Kingdom
- Cabestan Research
- Xenfin Capital Ltd
- University of York
- University of Birmingham
- University of Nottingham
- University of St Andrews
- Swansea University
Scotland, United Kingdom
- University of Strathclyde
California, USA
- Gazelle
New York, USA
- Cowen, Inc.
Massachusetts, USA
- Grimes & Company, Inc.
Florida, USA
- Parallax Quantitative Asset Management
Georgia, USA
- Aline Consulting LLC
Mexico
- Centro de Enseñanza Tecnica Industrial
Brasil
- Universidade de São Paulo
.NET environment
SuanShu.NET
This is a FREE, experimental version of the SuanShu library for the dot net environment. Download it directly below — no registration or email needed.
For more information, see










