Hacker News new | past | comments | ask | show | jobs | submit login

Example in "Early 1970s" is notoriously bad.

Text says: "it would be given some number of filenames as command line arguments, and it would read those ... Options didn’t exist".

Example shows: unneeded usage of `cat` as if `wc` is non-standard utility and cannot process file names by itself, option for `wc` is used. It contradicts text in both ways!




Is there any actual, useful, worthwhile reason for avoiding useless `cat` though?


Are several memory copies and context switches free for you? They are most expensive operations on modern hardware (yes, I know about splice syscall in Linux, but it is Linux-specific and don't avoid context switches). I think, on very high-end modern storage subsystem (like, stripe built out of several enterprise-grade NMVe SSDs) impact will be well-measurable in case of simple "wc".


I can imagine if you are running 70s vintage DEC hardware, there might be appreciable performance benefits to not spawning that extra process.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: