[PATCH 0/5] IP checksum improvements

Ondrej Zajicek santiago at crfreenet.org
Sun Apr 25 23:20:52 CEST 2010


On Sun, Apr 25, 2010 at 11:41:17AM +0200, Joakim Tjernlund wrote:
> Here are a series of performance improvements on the
> Internet checksum. With these changes applied I get about
> 20-30% better performance on x86 and PowerPC.

Although i agree with Martin Mares that such kind of optimizations
should be done mainly if we know (from profiling) that BIRD spends
a significant share of time (during update processing) in that function,
i did some changes to the checksum function and merged some of these
patches.

I did some more optimizations (changing the loop condition, removing len
decrement) and together with your change to add32 i got two times faster
checksum function (on x86) than the old code. Changing postincrement to
preincrement leads to worse results (only 1.4 times faster than the old
code) so i kept postincrement.

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20100425/231ce028/attachment-0001.asc>


More information about the Bird-users mailing list