xbmc/xbmc — pull request #3760 by bavison (2013-12-03 16:37:07+00:00)
Title: Faster floating point rounding

There are a couple of floating point rounding functions in MathUtils that seem to be rather suboptimal, which is a little surprising considering that they're fairly fundamental operations.

MathUtils::round_int in particular had a rather tortuous inline ARM assembler implementation! It's not a standard IEEE rounding mode, granted (round to nearest with ties to +infinity) but it's possible to construct it fairly easily using a round to zero, which is what a C cast does, and which a compiler can convert into an optimal handful of ARM instructions without the assistance of inline assembler.