summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-08-29 17:56:38 +0200
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-08-29 17:56:38 +0200
commitefce8e1747e1dd7be9ba6f4c26706c4a01716278 (patch)
tree948bfd9309d37b4645c0331f51e532dfce95e2c3 /tests
parentc0047d701aa88161bc2c7e5aced8c9c63239ccbf (diff)
uterm: video: improve blitting performance
Turns out gcc didn't optimize this trivial math so we do it by hand. This reduces the number of divisions per color to 1. This increases performance by like 15%. As a second optimization, we replace the division with a left shift, that is, we divide by 256. Technically, this is wrong as we will get slightly incorrect results. However, this is hardly noticible by human eye so we can safely use it. This increases performance by like 20% again. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions