← Products

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 modules

Performance benchmarks

13 operations · 12 libraries

A 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
Matrix transpose: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.1419.837
Apache Commons Math 3.57.125
Colt 1.2.05.021
Parallel Colt 0.10.12.427
EJML 0.253.076
JAMA 1.0.36.424
jblas 1.2.48.583
JLAPACK 0.81,924.31
MTJ 1.0.46.37
ojAlgo 38.24.749
UJMP 0.3.02.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
Matrix addition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.1432.482
Apache Commons Math 3.53.384
Colt 1.2.05.388
Parallel Colt 0.10.13.697
EJML 0.254.697
JAMA 1.0.31.317
jblas 1.2.412.906
JLAPACK 0.830.104
MTJ 1.0.412.468
ojAlgo 38.212.215
UJMP 0.3.04.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
Matrix scale: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.1421.283
Apache Commons Math 3.52.411
Colt 1.2.03.514
Parallel Colt 0.10.12.826
EJML 0.252.996
JAMA 1.0.31.066
jblas 1.2.47.336
JLAPACK 0.830.89
MTJ 1.0.47.302
ojAlgo 38.26.781
UJMP 0.3.02.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.

Matrix multiplication — relative runtimeSuanShu 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. Lower is better. Linear scale.045.5291.041136.561182.081SuanShu 3.3.0SuanShu 3.3.0: 11R 2.14R 2.14: 14.40514.405Apache Commons Math 3.5Apache Commons Math 3.5: 182.081182.081Colt 1.2.0Colt 1.2.0: 105.403105.403Parallel Colt 0.10.1Parallel Colt 0.10.1: 9.2719.271EJML 0.25EJML 0.25: 14.53214.532JAMA 1.0.3JAMA 1.0.3: 15.81715.817jblas 1.2.4jblas 1.2.4: 16.0616.06JLAPACK 0.8JLAPACK 0.8: 20.00720.007MTJ 1.0.4MTJ 1.0.4: 13.93713.937ojAlgo 38.2ojAlgo 38.2: 2.092.09UJMP 0.3.0UJMP 0.3.0: 1.5721.572
Relative runtime · SuanShu 3.3.0 = 1 · lower is better · linear scale (starts at 0)
Exact runtime values
Matrix multiplication: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.1414.405
Apache Commons Math 3.5182.081
Colt 1.2.0105.403
Parallel Colt 0.10.19.271
EJML 0.2514.532
JAMA 1.0.315.817
jblas 1.2.416.06
JLAPACK 0.820.007
MTJ 1.0.413.937
ojAlgo 38.22.09
UJMP 0.3.01.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
Matrix determinant: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.141.821
Apache Commons Math 3.531.861
Colt 1.2.05.002
Parallel Colt 0.10.15.051
EJML 0.253.16
JAMA 1.0.33.106
jblas 1.2.42.52
JLAPACK 0.83.379
MTJ 1.0.448.544
ojAlgo 38.21.183
UJMP 0.3.03.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
Matrix inverse: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.144.726
Apache Commons Math 3.519.065
Colt 1.2.07.723
Parallel Colt 0.10.18.396
EJML 0.254.539
JAMA 1.0.36.246
jblas 1.2.44.476
JLAPACK 0.84.876
MTJ 1.0.44.131
ojAlgo 38.21.008
UJMP 0.3.06.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
Symmetric matrix inverse: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.142.566
Apache Commons Math 3.57.768
Colt 1.2.077.602
Parallel Colt 0.10.10.952
EJML 0.254.642
JAMA 1.0.3117.715
jblas 1.2.48.739
JLAPACK 0.83.147
MTJ 1.0.45.528
ojAlgo 38.20.763
UJMP 0.3.0118.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
Cholesky decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.148.73
Apache Commons Math 3.513.778
Colt 1.2.013.713
Parallel Colt 0.10.11.192
EJML 0.257.94
JAMA 1.0.311.22
jblas 1.2.48.848
JLAPACK 0.812.699
MTJ 1.0.48.466
ojAlgo 38.24.755
UJMP 0.3.011.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
LU decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.141.871
Apache Commons Math 3.532.189
Colt 1.2.05.112
Parallel Colt 0.10.15.11
EJML 0.253.28
JAMA 1.0.33.176
jblas 1.2.42.541
JLAPACK 0.83.424
MTJ 1.0.41.728
ojAlgo 38.21.149
UJMP 0.3.03.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
QR decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.142.329
Apache Commons Math 3.58.097
Colt 1.2.070.712
Parallel Colt 0.10.11.672
EJML 0.254.591
JAMA 1.0.3101.534
jblas 1.2.412.338
JLAPACK 0.85.739
MTJ 1.0.44.435
ojAlgo 38.21.223
UJMP 0.3.0101.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
Symmetric eigenvalue decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.142.358
Apache Commons Math 3.525.56
Colt 1.2.045.414
Parallel Colt 0.10.145.482
EJML 0.254.82
JAMA 1.0.345.331
jblas 1.2.42.534
JLAPACK 0.83.833
MTJ 1.0.42.156
ojAlgo 38.24.273
UJMP 0.3.045.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
Singular value decomposition: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.142.129
Apache Commons Math 3.539.294
Colt 1.2.040.014
Parallel Colt 0.10.13.445
EJML 0.253.24
JAMA 1.0.338.963
jblas 1.2.46.509
JLAPACK 0.83.004
MTJ 1.0.42.056
ojAlgo 38.22.592
UJMP 0.3.038.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
Solving a linear equality system: relative runtime values
LibraryRelative time
SuanShu 3.3.01
R 2.146.293
Apache Commons Math 3.517.929
Colt 1.2.07.531
Parallel Colt 0.10.18.312
EJML 0.255.605
JAMA 1.0.35.857
jblas 1.2.45.837
JLAPACK 0.87.276
MTJ 1.0.45.477
ojAlgo 38.20.959
UJMP 0.3.05.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

Community

  • BASIC
  • OPTIM
  • STATS

A previous version of the source code, released on GitHub.

Free on GitHub →

Academic

  • BASIC
  • OPTIM
  • STATS

For Qualified Academic Users: the BASIC, OPTIM and STATS packages.

I am a student →
Popular

Commercial

  • BASIC
  • OPTIM
  • STATS
  • O/PDE
  • EVT

Run selected modules on a machine permanently.

I am a professional →

Contributor

  • Customized

Contribute accepted code and earn a permanent license.

Submit a proposal →

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.

Numerical Methods Using Java book coverNumerical Methods Using Kotlin book cover

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.