-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Description
Js side conversion (like new Uint8Array(buffer)
or new Buffer(bufferView)
) is really slow cause it treats input as an integer array rather than a pointer to a memory address.
In older version of node.js which is compiled with v8 that does not support ArrayBuffer, ArrayBufferViews are constructed with node's Buffer, so there is no such problem.
Could we afford a new api like:
var buf = new Buffer(1<<28);
var arrBuf = buf.toArrayBuffer();
var buf2 = Buffer.fromArrayBuffer(arrBuf);
Metadata
Metadata
Assignees
Labels
No labels