Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, char** argv) {
- int i;
- for (i = 0; i < 1000; ++i) {
- FILE *fp = fopen(argv[1], "rce");
- while (! feof_unlocked (fp)) {
- char line[1024];
- fgets(line, sizeof(line), fp);
- }
- fclose(fp);
- }
- return 0;
- }
- $ g++ -o test test.c -O2 -lpthread
- $ time ./test /proc/27181/maps
- real 0m0.305s
- user 0m0.032s
- sys 0m0.273s
Advertisement
Add Comment
Please, Sign In to add comment