zlacker

[return to "My fast zero-allocation webserver using OxCaml"]
1. boltzm+wy[view] [source] 2026-02-02 14:51:30
>>noelwe+(OP)
it's a massive crime that decades into FP, we still don't have a type system that can infer or constrain the amount of copies and allocations a piece of code has. software would be massively better if it did - unnecessary copies and space leaks are some of the most performance-regressing bugs out there and there simply isn't a natural way of unearthing those.
◧◩
2. AlotOf+zB[view] [source] 2026-02-02 15:09:36
>>boltzm+wy
Allocations and copies are one of the things substructural typing formalizes. It's how E.g. Rust essentially eliminates implicit copies.
◧◩◪
3. whatis+K21[view] [source] 2026-02-02 17:23:11
>>AlotOf+zB
I think I've heard of Rust devs complaining about moves having implicit bitwise copies that were not optimized away.
◧◩◪◨
4. AlotOf+Q91[view] [source] 2026-02-02 17:57:10
>>whatis+K21
Traits with Copy can do that, I'm just saying they're not really implicit copies because it's a core, visible part of the language that the developer can control on all of their own types.
◧◩◪◨⬒
5. whatis+zf1[view] [source] 2026-02-02 18:24:42
>>AlotOf+Q91
But do bitwise copies when moving not also possibly incur that, even without Copy? If the optimizer doesn't optimize it away? Since movement can happen by copying bits and releasing the old bits, as long as there is no UnsafeCell in the type, or something along those lines?

https://www.reddit.com/r/rust/comments/vo31dw/comment/ieao7v...

[go to top]