Hacker News new | ask | show | jobs
by fwip 111 days ago
I agree with your post, but in practice, couldn't you get back that efficiency by setting T = UInt8Array? That is, write your stream to send / receive arrays.

My reference point is from a noob experience with Golang - where I was losing a bunch of efficiency to channel overhead from sending millions of small items. Sending batches of ~1000 instead cut that down to a negligible amount. It is a little less ergonomic to work with (adding a nesting level to your loop).

1 comments

Yes, then you are back to Cloudflare's suggested interface.

An async iterator of buffers.