FIXReader calls sockRead too many times. I think the optimal way here is to have a userspace buffer or stream that is filled in once by a single call to sockRead. Then until the buffer/stream is not empty read op just read from it, not socket. When the socket/buffer is empty, real socket read is called.
Ubuntu 13.10 x64 gcc4.8
Not sure your suggested approach will improve performance. Here's why:
In Linux, I think read is already in the VDSO
The kernel already reads frames way ahead into the tcp buffers, so the only difference will be between performance in user and kernel modes (hence why VDSO will make a huge difference)
Fix8 also supports user configured tcp send/rcv buffers which are used by the kernel for buffering
Right, still I'd like to reduce the number of calls to places that we don't control and even the number of calls itself. recv call is still takes much-much longer than just our own buffer current ptr increment...
I'll prepare the fix in couple of days and send you for review.
Created pull request