Ämne:
[dcdev] Protocol testing
Från:
Fredrik Tolf
Datum:
2003-12-01 11:47
Till:
[email protected]

Hi!

I wrote a quick and dirty test suite for comparing binary command
parsing to text parsing. Note that I have hardly optimized it at all
or anything, so if you want to look at the code and possibly make it
more "real-life", it's available at:
http://www.dolda2000.com/~fredrik/dc/protocoltest.tar.gz
Note that it is a really quick and dirty test, so please don't be
scared of the code quality. ;-)

In any case, the results... I generated 10000 random commands, and
when comparing the parsers themselves, the text parser took about 2.3
times the time that the binary parser took to parse the 10000
commands, which can be quite a large difference.

However, the really interesting part is how it behaved with cold
caches, as will probably be much more like what it looks in real life,
the time difference between the parsers was less than 0.5%. I think
that in itself is a reason to promote a text protocol.

Input?

Fredrik Tolf

-- 
DC Developers mailinglist
http://3jane.ashpool.org/cgi-bin/mailman/listinfo/dcdev