A high performance computation for nodejs to do CPU intensive computation.
npm install enhance-computationSimple Computation addon written by node-api for nodeJS,we provide these functions
1. alculate average by two given arrays and basic calculation.
2. add two numbers.
3. sub two numbers.
4. multiply two numbers.
5. div two numbers.
All parameters should be string.
All functions return a string as result.
const computation = require('enhance-computation');let valueArray1 = ['10.5','22.35'];
let valueArray2 = ['5.553', '2.557'];
for (let i = 0; i < 30000; i++) {
console.log(computation.calculateAverage(valueArray1, valueArray2));
}
More usages in the usage.js
``