[PATCH] ipsum_calc_block: Optimize size and speed

Martin Mares mj at ucw.cz
Fri Apr 23 15:20:55 CEST 2010


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.

(Anyway, it might be interesting to run OProfile on Bird to see which parts
of the code are real hot spots and where we should focus more on maintainibility
than on speed.)

				Have a nice fortnight
-- 
Martin `MJ' Mares                          <mj at ucw.cz>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
To understand a program you must become both the machine and the program.



More information about the Bird-users mailing list