[PATCH] ipsum_calc_block: Optimize size and speed

Joakim Tjernlund joakim.tjernlund at transmode.se
Fri Apr 23 15:14:14 CEST 2010


Martin Mares <mj at ucw.cz> wrote on 2010/04/23 15:03:34:
>
> Hello!
>
> > This is a much simpler and efficent impl. of the IP checksum.
> > It is a dry port from Quagga and I have not tested it.
>
> Are you convinced that your version is more efficient? The original version
> processes 32 bits at a time, while your code does only 16 bits at a time. It might
> be worth the saved branch, but do you have any benchmark proving that it
> helps?

Fairly, I once had the same idea for Quagga but found all those extra tests and
additions were much slower(I benched it). Just look at the number of extra ops one
has to do in the current code.
If you want to do it faster you have to go ASM. It would be easy to
add support for that too but it can wait.

     Jocke




More information about the Bird-users mailing list