mulix wrote:

>
>i decided to play too. i took your code and modified it, so that the
>tests are run seperately (since i didnt want the after effects from
>fork's COW behaviour to affect the memcpy case). i also modified it to
>use getrusage(). 
>
>here are my results:
>
>[mulix@alhambra tmp]$ for arg in 1 2 3; do ./b memcpy ; done ;
>memcpy'ed      1000 blocks of size 1048576. user time: 16.070000 secs, system time: 
>0.060000 secs
>memcpy'ed      1000 blocks of size 1048576. user time: 15.960000 secs, system time: 
>0.040000 secs
>memcpy'ed      1000 blocks of size 1048576. user time: 15.920000 secs, system time: 
>0.060000 secs
>[mulix@alhambra tmp]$ for arg in 1 2 3; do ./b send ; done ;
>sent           1000 blocks of size 1048576. user time: 6.990000 secs, system time: 
>10.020000 secs
>sent           1000 blocks of size 1048576. user time: 7.420000 secs, system time: 
>10.330000 secs 
>sent           1000 blocks of size 1048576. user time: 7.110000 secs, system time: 
>10.380000 secs
>
Interesting, I compiled and ran your code with results:

memcpy'ed       1000 blocks of size 1048576. user time: 17.830000 secs, 
system time: 0.010000 secs
sent            1000 blocks of size 1048576. user time: 8.190000 secs, 
system time: 5.670000 secs

The sum of user and system time is pretty much equal (just as in yours)

I then commented out the memset commands and got:

memcpy'ed       1000 blocks of size 1048576. user time: 8.900000 secs, 
system time: 0.040000 sec
sent            1000 blocks of size 1048576. user time: 0.000000 secs, 
system time: 0.620000 secs

This is a dramatic difference.

Did you try this ?




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to