On 19.03.2008, at 8:54, Oleg Andreev wrote:
> http://gitorious.org/projects/eventmachine-utils
>
> Chaining (em_chain.rb) seems to be extremely useful (at least, for
> me) and seems to involve as little overhead, as possible. I''m
going
> to do some benchmarks soon.
> SimpleMessageProtocol & MarshalProtocol are based on a chaining
> facility.
I''ve done a simple benchmark-comparison for simplistic protocols
versus a fat stack of chained protocols. In a real-world applications
there might be 5-7% speed drop comparing to a simple message protocol
and 15-17% drop comparing with very naive approach of messaging with
EM''s receive_data & send_data (which is in general incorrect, but
fast
and suitable for data streaming or very custom protocols).
Code & results:
http://gitorious.org/projects/eventmachine-utils/repos/mainline/blobs/master/benchmarks/chaining_overhead.rb