3 ms·
While I think the move to safer code through Rust and other alternatives is a nice breath of fresh air, I doubt you can get these kinds of optimization without
by jeroenhd 3y ago
While I think the move to safer code through Rust and other alternatives is a nice breath of fresh air, I doubt you can get these kinds of optimization without using unsafe code in Rust. These optimized implementations often require some kind of safety-bypassing memory modifications to work as efficiently ad they do.
There's a reason https://github.com/libjpeg-turbo/libjpeg-turbo/tree/main/simd/x86_64 https://github.com/libjpeg-turbo/libjpeg-turbo/tree/main/sim... is filled with assembly files with conditional loading.
- winter_blue 3y agoOh wow, I didn't realize there were mountains of Assembly in there. If this is the case, I'd say: let's put libraries like this Docker-like containers (in their processes with their own address space), and use mmap/etc-based highly-efficient IPC to interact with them. With all the hyper-optimized assembly in there, it's probably still more efficient even with the container penalty (which, tbh, is close to zero on Linux these days).