[PATCH] ipsum_calc_block: Optimize size and speed

Ondrej Zajicek santiago at crfreenet.org
Fri Apr 23 21:39:06 CEST 2010


On Fri, Apr 23, 2010 at 07:40:28PM +0200, Joakim Tjernlund wrote:
> Martin Mares <mj at ucw.cz> wrote on 2010/04/23 19:23:18:
> >
> > Hello!
> >
> > > > > So there isn't really difference in performance of both
> > > > > implementations. Even on slow embedded AMD Geode CPU, it gives
> > > > > ~ 180 MB/s.
> > >
> > > No difference? what does 1.2 mean? to me this means 20% which is a lot
> >
> > Yes, but according to Santiago's benchmarks, your code is sometimes 20%
> > faster, sometimes 20% slower. It does not seem like a reason for change.
> 
> uhh, 20% slower? Ahh now I see, the MIPS. That is really strange. Santiago, are
> you sure that is not a typo?

FYI, code z = sum + x, z + (z < sum) was compiled to:

addu    $2,$3,$2
sltu    $3,$2,$3
addu    $3,$2,$3

Therefore, doing half number of iterations outweights in that case.

BTW, it was compiled by GCC 3.4.6

-- 
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/4ae330a6/attachment-0001.asc>


More information about the Bird-users mailing list