3 ms·
For me, the "-T0" in zstdcat raises major alarm bells. There doesn't exist a simple problem that cannot be made an utter clusterfuck by adding multithreading.
by WesolyKubeczek 4y ago
For me, the "-T0" in zstdcat raises major alarm bells. There doesn't exist a simple problem that cannot be made an utter clusterfuck by adding multithreading.
(If you have a single, unseekable stream of bytes on input, and one output stream, the usefulness of threads is evading me.)
- vlovich123 4y agoYour CPU time processing the bytes greatly exceeds the I/O time reading them off the wire (not to mention generally pipelining I/O and CPU activities).
- WesolyKubeczek 4y agoThis "greatly", in case of zstd, is where citation is needed.
- WesolyKubeczek 4y agoMy point still stands. Multithreading is not something you "just" throw in. It's riddled with unexpected gotchas you didn't know you had in your own code, plus all quirkiness of the underlying libc and OS.
- heinrich5991 4y agoThe amount of unexpected gotchas varies greatly by the programming language you use.
- Filligree 4y agoTrue. Most of my Rust tools are multithreaded, and this has never caused trouble. But zstd is written in C, is it not?