One Byte Per Syscall
A utility copies a 64 MiB file using raw read() and write() in a loop, no stdio, with a 1-byte buffer. On this machine a syscall trap plus return costs 60 ns, and the per-byte copy work is negligible by comparison.
How much wall-clock time does the copy spend on syscall overhead alone?
Sign in to answer questions and track your progress
Sign In