-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I am trying to create an app which runs in real time, but when I test it the array looping is so slow it is not usable
const ffi = require('ffi-napi');
const ref = require('ref-napi');
const ArrayType = require('ref-array-di')(ref);
const int = ref.types.int;
const IntArray = ArrayType(int);
let arr = new IntArray(1280*1080*3)
console.time('time')
for (let i = 0; i < arr.length; i++) {
const element = arr[i];
}
console.timeEnd("time")
This takes 3394ms to loop through. Do anyone know how to fix this?
Metadata
Metadata
Assignees
Labels
No labels