Boost logo

Boost Users :

From: j.c. (jolix_at_[hidden])
Date: 2008-03-04 05:32:49


It's p2p, so lost of connections, packets, etc..

Could I get an updated copy? That would be most helpful.

Again, thanks so much.
On Mar 3, 2008, at 9:43 PM, KSpam wrote:

> JC,
>
>> Do you think the speed is OK for data transmission over udp sockets?
>
> Unfortunately, this is a difficult question to answer, so I will
> resort to the
> standard engineering response ... it depends :-) There are many
> parameters
> that can play into the answer, and they all depend on the nature of
> the
> application. For instance:
>
> What frequency are messages being sent?
> What is the average message size?
> What is the speed and reliability of the network connection?
>
> There will obviously be some overhead required in compressing the
> messages.
> If the network connection is unreliable or slow, then the overhead
> may be
> worthwhile. If the network is reliable and fast (or if your sending
> or
> receiving processor is slow), the compression overhead may not be
> worthwhile.
> Of course, the beauty of Boost.Iostreams is that adding, removing, or
> changing the compression type is very easy to do. When you
> prototype your
> application, you can perform throughput analysis to determine the
> optimal
> setup.
>
> I modified the example I sent to add a bzip2 compression test (ALGO
> 4) and a
> no compression test (ALGO 3). Here are the results from running a
> debug
> Linux build on my machine:
>
> ALGO 0 : 10000 cycles took 1.261 seconds!
> ALGO 1 : 10000 cycles took 1.2 seconds!
> ALGO 1 : Improvement 4.83743 %
> ALGO 2 : 10000 cycles took 0.652 seconds!
> ALGO 2 : Improvement 48.295 %
> ALGO 3 : 10000 cycles took 0.218 seconds!
> ALGO 3 : Improvement 82.7121 %
> ALGO 4 : 10000 cycles took 0.928 seconds!
> ALGO 4 : Improvement 26.4076 %
>
> For grins, here are the release build results:
>
> ALGO 0 : 10000 cycles took 0.927 seconds!
> ALGO 1 : 10000 cycles took 0.88 seconds!
> ALGO 1 : Improvement 5.07012 %
> ALGO 2 : 10000 cycles took 0.345 seconds!
> ALGO 2 : Improvement 62.7832 %
> ALGO 3 : 10000 cycles took 0.028 seconds!
> ALGO 3 : Improvement 96.9795 %
> ALGO 4 : 10000 cycles took 0.597 seconds!
> ALGO 4 : Improvement 35.5987 %
>
> As you can see, the no compression case (ALGO 3) is significantly
> faster. In
> this case, zlib compression (ALGO 2) is faster than bzip2
> compression (ALGO
> 4). Bzip2 compression generally compresses the data better than zlib
> compression though. There's always a tradeoff :-)
>
> Hope This Helps,
> Justin
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net