i have a simple test environment
i have a server
i have a client
/*booth C progs*/
the client does write(); in a loop
and the server does read(); in a loop
the client does some time measurement so i know how fast i can be
what i want:
the maximum throuthput which is possible and which fits in my application needs
i'm not sure if my mesaurements are correctly
but what i know is
if i do ONLY write(); AND read(); in a loop on both sides
i get a value of 2002
on the server side
if i do a memcpy(); during the loop
i get a value of 600
this means if i copy a buffer (the incoming to an temp buffer) the speed is slowed down!
i know i never get a value of 2000 if my whole app is between write(); and read();
BUT i want at minimum 1000!
i thought about writing
because gcc does not always use the best implementation of assembler memcpy!!!
on some cpu's
a loop with mov commands is faster than
using the rep command!!!
so my questions:
1. because i have very very very basic knowledge of assembler itself i have no idea how the gcc assembler syntax works!
the best would be that somebody can write those few lines in assembler for me
maybe i get some little to understand info on assembler programming in gcc
so i can try the two possible memcpy assembler implementations (rep or mov)
2. maybe some weird GCC command line optimization options would help!!
but i have no idea which options do what
so i don't know which to use
and i don't know which options are available
btw. if use memcpy and my whole algorithm is between write(); and read(); i have a throughput of 400
this is fast
so if anybody posts
DON'T try it!
i only have to say
but i want it to try
that's the only way i learn many things about linux, C and maybe assembler
so please help and don't say
let it be