McNumJS
McNumJS is a high-performance JavaScript library for numerical computations which provides an easy-to-use API like NumPy. McNumJS makes use of TypedArrays which provide a mechanism for accessing data much more efficiently. McNumJS uses implicitly typed objects specified by asm.js so that modern javascript engines can optimize the code more efficiently and provide higher performance. Compiler writers who target javascript language and other web developers or scientists can make use of this library for numeric computations on the web.
McNumJS Modules
Module | Description | Example properties/methods |
---|---|---|
Core | Extends JavaScript typed arrays to provide multi-dimension support | shape, stride, size, get, set, index, map |
Generation | Provides API to generate different matrices | zeroes, ones, random |
Unary Operations | Creates Unary operation functions | sum, average, sin, cos, fill |
Binary Operations | Creates Binary operation functions | add, subtract, multiply, divide |
Examples
- Core Module
- Generation Module
- Unary / Binary Operations
Performance
- McnumJS vs. Regular JavaScript: (Higher is better)
- McNumJS vs. JavaScript with typed arrays: (Lower is better)
- McNumJS vs. Compiled asm.js: (Lower is better)
- McNumJS vs. C: (Lower is better)
Development
For the development, you will need to install following dependencies.
Run following command to install other dependencies:
npm install
To build and test the library, run following command:
grunt && grunt test
People
Publications
- Lecture:  McNumJS Lecture At CASCON
- Thesis:  McNumJS: A JavaScript Library for Numerical Computations