3 ms·
Perhaps because sending GiBs through read(2) and write(2) unnecessarily isn't a NOP?
by ralph 14y ago
Perhaps because sending GiBs through read(2) and write(2) unnecessarily isn't a NOP?
- Athas 14y agoYou can do that sending while you're waiting for the disk to provide said GiBs. I also believe that useless uses of cat are often acceptable for readability (many novices are not familiar with redirecting standard input, particularly not as the first thing on a command line).
- ralph 14y agoWho said the GiBs need to be fetched from disk; they could already be in RAM. Even if not, it's still adding many system calls and context switches when the CPU could be doing other things; the machine isn't running just this one thing.
- alexfoo 14y agoWho said NOPs are free? NOPs still take at least one clock cycle.
- zvrba 14y agoIt's not that simple anymore... In modern CPUs, NOPs are discarded by the decoding units so they never occupy the exeuction units. If decoding BW is not saturated (and most often, it's not), NOPs are indeed "free".