[PATCH] ipsum_calc_block: Optimize size and speed

Ondrej Zajicek santiago at crfreenet.org
Fri Apr 23 18:32:03 CEST 2010


On Fri, Apr 23, 2010 at 03:20:55PM +0200, Martin Mares wrote:
> Hello!
> 
> > 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.
> 
> My primary reaction was "If something isn't broken, don't fix it." I.e.,
> unless you have good reasons for rewriting a piece of code, don't do that.
> 
> Your version is more readable and I would be in favour of accepting it,
> but I would still like to see at least a very simple benchmark which shows
> that it is not significantly slower.

I was curious enough to do some benchmarks and got these results:

Intel Atom:	suggested code ~ 1.2* faster
AMD Geode:	no diference
MIPS ADM5120:	old code ~ 1.2* faster

So there isn't really difference in performance of both
implementations. Even on slow embedded AMD Geode CPU, it gives
~ 180 MB/s.

-- 
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/20100423/fab339f4/attachment-0001.asc>


More information about the Bird-users mailing list