Meh. Even hosting static files in a RAM disk over localhost, you’re 99% as good as you can be by using the sendfile() system call. The kernel can copy data from one file descriptor to another faster than any userspace program can. Implementing the Length header is a stat() call.
If you’re not on a RAM disk and not on localhost, then disk access or network throughput will predominate.
Meh. Even hosting static files in a RAM disk over localhost, you’re 99% as good as you can be by using the
sendfile()
system call. The kernel can copy data from one file descriptor to another faster than any userspace program can. Implementing theLength
header is astat()
call.If you’re not on a RAM disk and not on localhost, then disk access or network throughput will predominate.
Assembly is not magic go faster sauce.