← Blog

Inspiration Behind S2 and NM Dev

By Gareth Koh ·

The problem: two languages, two teams

Scripting languages such as R, MATLAB and Python come with huge mathematics libraries built in, and they let you interact with data dynamically. They are simple enough that even someone with no programming experience can be productive, which makes them extremely effective prototyping tools.

But once the prototype is done, the code usually has to be translated into a production language — Java, C#, C++ — so that it runs faster (often up to 100 times faster), runs more stably, and integrates with the hosting framework, application, hardware and software around it.

That translation is painful. It is hard to guarantee that the prototype and the production code produce the same outputs. The prototype is typically written by mathematicians who know little about software engineering, while the production code is written by programmers who know little about the mathematical models. Worse, the mathematical libraries available to the prototyping languages are often simply not available to the production languages. The result is a slow, error-prone, expensive process.

Our answer: one language for both

Running on the S2 IDE, NM Dev eliminates the translation step by combining the strengths of the prototyping and production languages into a single integrated language. You test and ship the same code.

NM Dev is:

  • High performance — faster than any scripting language.
  • High availability — errors and exceptions are handled properly, as production code demands.
  • Portable — it runs anywhere a Java Virtual Machine runs: servers, vehicles, microwaves, watches and mobile phones.
  • Complete — a large library of numerical algorithms is built in.
Matrix multiplication written in NM Dev's concise syntax
Syntax for our matrix multiplication is simple.
The result of the matrix multiplication, rendered in the S2 IDE
Result of matrix multiplication presented in a visually appealing manner.

Beyond prototyping

NM Dev is not only about streamlining the production process. It also supports big data analytics and artificial intelligence, and it visualizes huge amounts of data directly in the IDE.

Data analysis in NM Dev

S&P 500 data visualized in the S2 IDE
Data visualization of the S&P 500 using the S2 IDE.

The math library

The NM Dev math library covers all of classical mathematics — linear algebra, calculus, statistics, time series analysis and more — and ships the most comprehensive optimization library available, covering all aspects of classical mathematical optimization.

It is also the fastest math library available to date: our matrix multiplication is 180 times faster than Apache's and 14 times faster than R's. (SuanShu 3.3.0 has been replaced by NM Dev.)

Benchmark chart comparing 2000 by 2000 matrix multiplication times across libraries
Comparison of time taken to complete a 2000 by 2000 matrix multiplication.

Try it

If you want to streamline your development process and increase performance, NM Dev is for you. Try the S2 IDE in your browser.