Hi, I think I have identified the reason behind the performance difference between running in browser vs Node.js. Unlike TypedArray.slice(), which generates a new copy of the sliced portion, Buffer.slice() produces a new buffer that shares memory with the original buffer, essentially behaving in the same way as the subarray() method. This discrepancy is why Buffer.slice() has been deprecated.
Hi, I think I have identified the reason behind the performance difference between running in browser vs Node.js. Unlike TypedArray.slice(), which generates a new copy of the sliced portion, Buffer.slice() produces a new buffer that shares memory with the original buffer, essentially behaving in the same way as the subarray() method. This discrepancy is why Buffer.slice() has been deprecated.
I ran some tests using three different videos: