Speed up pixman_expand_to_float()
authorSøren Sandmann Pedersen <ssp@redhat.com>
Sun, 23 Sep 2012 07:52:34 +0000 (03:52 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Thu, 4 Oct 2012 07:34:05 +0000 (03:34 -0400)
commitec7aa11a6e4d0d02df9b339dfce9460dce954602
treef5bd53c0c6b97bbc1a29808cfa3f661d7afd08eb
parent8ccda2be30adf9dfcc3087b38a5062258324dcce
Speed up pixman_expand_to_float()

GCC doesn't move the divisions out of the loop, so do it manually by
looking up the four (1.0f / mask) values in a table. Table lookups are
used under the theory that one L2 hit plus three L1 hits is preferable
to four floating point divisions.
pixman/pixman-utils.c