httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: Question. fopen() in ap_pfopen() background ?
Date Fri, 15 Oct 1999 00:06:23 GMT


On Tue, 12 Oct 1999, Greg Stein wrote:

> I do understand that FILE* can avoid a kernel context switch by
> buffering in libc, but is there really a big perf gain?

yes.  try timing a program which does read(fd, &c, 1) against another
which does fgetc.

> Don't most
> modern operating systems provide plenty of builtin buffering?

it's irrelevant.  a system call is at least an order of magnitude more
expensive than a function call (which is more expensive than an inline
fgetc style macro).  system calls involve privilege level changes -- which
means verifying the integrity of all the data passed from userland.

Dean


Mime
View raw message