38 points | by mrngm 3 hours ago ago
6 comments
A good reminder. It is surprising first time you encounter it.
Same for Rust. As https://doc.rust-lang.org/stable/std/io/fn.copy.html says, std::io::copy can use copy_file_range(2), sendfile(2), or splice(2).
Zero-Copy in Go: Why magic is an antipattern, and: performance is observable behavior.
What would you prefer?
I do think it is criminal this is not documented (https://pkg.go.dev/io#Copy), but I think io.Copy is fine as an API.
Interesting premise for a post, but I had to stop midway due to the AI slop writing adding meaningless information.
Ugh, AI slop writing.
Definitely written by codex.
A good reminder. It is surprising first time you encounter it.
Same for Rust. As https://doc.rust-lang.org/stable/std/io/fn.copy.html says, std::io::copy can use copy_file_range(2), sendfile(2), or splice(2).
Zero-Copy in Go: Why magic is an antipattern, and: performance is observable behavior.
What would you prefer?
I do think it is criminal this is not documented (https://pkg.go.dev/io#Copy), but I think io.Copy is fine as an API.
Interesting premise for a post, but I had to stop midway due to the AI slop writing adding meaningless information.
Ugh, AI slop writing.
Definitely written by codex.