3 ms·
Yes. If you do lots of sequential/local reads you can reduce the number of context switches dramatically if you do something like: /* to reduce context sw
by nabla9 6y ago
Yes. If you do lots of sequential/local reads you can reduce the number of context switches dramatically if you do something like:
/* to reduce context switch */
int bsize = 16*BUFSIZ;
int fopen_bsize(char * filename) {
int fp = fopen(filename, "r");
setvbuf(fp, NULL, _IOFBF, bsize);
return fp;
}