On Sat, 30 Apr 2005 17:12:20 +0200 Serassio Guido <[EMAIL PROTECTED]> wrote:
Hi Henrik,
I don't wrote that your solution is wrong, or that C++ classes are bad. I wrote that your solution is slower.
I doubt it actually is.
The Evgeny's specific implementation is it. Its read() checks for the fd type at every I/O operation, when this could be done only one time when creating the fd.
One function call to fuction like int test(int mode) { int rc; switch(mode) { case 0: rc = 0; break; case 1: rc = 2; break; case 2: rc = 3; break; case 3: rc = 4; break; } return rc; }
take 1 / 14 * 1000 * 1000 sec on good old P2-350. Without optimization
if suppose that every call to such function is to read/write 512 byte than the limit is about 7 Gb/sec ;-)
SY, Evgeny Kotsuba
