@salem: Yes, indeed it's limited by hd-speed and with me even more because my HD is full-encrypted. But I think I can get better than cat. Maybe my BUFSIZE isn't that good choosen as I thought because I thought taking exactly one mempage should be the best case. Maybe it's not. Or it was simply some other process while the syscall test which stole memmory which didn't run during the cat test.
@matsp: this was now the printing way. If I do this speedtest code I posted with > /dev/null also the result will be dumped. Okay I could write it to a file before.. but all tests show, that syscall_writing to the screen is a bit faster than printf or fputs. It's simply the time to the libC which is not with using syscalls.
Yes, but you are also spending most of the time scrolling the display, rather than performing system call - which is like measuring the speed of a car in Central London (or NYC) during rush-hour and saying "Cars do 12mph maximum". Use the same car somewhere a bit less full of traffic, and you are going to get a different result!
There is indeed some overhead in using the C library - this is not a new discussion. But the C library isn't there to stop you from doing what you want and doing it reasonably efficiently - it is there to help you get the job done with relative ease.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.