Hacker News new | ask | show | jobs
by maga 1655 days ago
This is great news! Good luck, Luca!

> Better support for explicit resource management

+1

Since everyone is making feature requests, I'd like to point out `ArrayBuffer.transfer`[1] -- ability to effectively move data without copying would do wonders for low-level/high-performance code in JS.

[1] https://github.com/tc39/proposal-resizablearraybuffer

1 comments

Yeah, this is something we have been thinking about too. Something else along those lines would be read-only buffers, and with that a copy-on-write operation for buffers. They could result in a significant speedup for many operations.
* a copy-on-write copy operation of buffers (that returns a read only buffer)