The topic of this post is this recent diff. It doesn't at all change the results of the function; I simply unrolled the loop to take advantage of the fact that most of the loop's variables were dependent on the loop constant itself. The result was only 7 lines (!) down from well over 30. Thanks to an earlier ffmpeg patch for the original idea and some of the code.
Apparently GCC doesn't actually measure the benefit gained from constant propagation in unrolling loops, so one is forced to manually unroll in this sort of case.
Oh, and I got roughly a 50% speedup in this function by doing this (not counting the encode_decision calls).
01 May 2008
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment