]> arthur.barton.de Git - bup.git/commit
_hashsplit.c: switch rollsum_roll() to a macro instead of an inline function.
authorAvery Pennarun <apenwarr@gmail.com>
Tue, 27 Jul 2010 07:06:26 +0000 (03:06 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 28 Jul 2010 04:43:55 +0000 (00:43 -0400)
commitfd7263ba1c79cfa4d3614053bad12949a67f10b0
treea9a09ac40608dcd3b0cfbede34e0f4cb42638227
parent933808f233e397bea86faf63fcb39c2507774b6c
_hashsplit.c: switch rollsum_roll() to a macro instead of an inline function.

gcc 4.3's optimizer manages to fail at optimizing the inline, but works okay
with the macro.

Mysteriously, if find_ofs() is *not* static (and therefore presumably
*harder* to optimize), the optimizer works either way.  But removing the
static is just wrong, so use the macro instead.

The difference in speed is about 53 megs/sec vs 80 megs/sec on my machine
for this command:

bup random 100M 2>/dev/null | bup split -N --bench

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/_hashsplit.c