Rewriting the GNU Coreutils in Rust
Rewriting the GNU Coreutils in Rust
Posted Jun 9, 2021 6:19 UTC (Wed) by LtWorf (subscriber, #124958)In reply to: Rewriting the GNU Coreutils in Rust by tux3
Parent article: Rewriting the GNU Coreutils in Rust
In ls doing all those stat() and systemcalls are way way heavier than any CPU processing.
You can use several threads but they are blocking each other out to access the same hardware resource, and remember that switching thread is not cheap at all, so in the end you are likely to end up with a multicore version of ls that is also way slower and has much much more complex code that is also more error prone.
