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: santi...@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."

Attachment: signature.asc
Description: Digital signature

Reply via email to