summaryrefslogtreecommitdiff
path: root/render/gradient.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-10 16:49:16 -0500
committerMikael Magnusson <mikachu@comhem.se>2008-02-14 19:40:02 +0100
commit1d00d9947067da76ac4d8d0a6b9ef2c28e73349e (patch)
treeaedd5d32e7b1a63ffed131181e110924ef53c7ec /render/gradient.h
parent18a35e04914bf8d108cf7a9d46970f13620ef534 (diff)
use memcpy's to make splitvertical gradient much faster - using log n memcpy's is much quicker than setting a pointer value n times
Here are some profiling results. splitvertical1 is the original code, splitvertical2 is some slight improvements in locality for it, and splitvertical3 is the new O(log n) memcpy code % cumulative self self total time seconds seconds calls ms/call ms/call name 49.44 0.88 0.88 1063 0.83 0.83 gradient_splitvertical1 47.19 1.72 0.84 1063 0.79 0.79 gradient_splitvertical2 2.81 1.77 0.05 1063 0.05 0.05 gradient_splitvertical3 i also tested this with 'time' to draw 1000 gradients, and the new code used approximately half the user time, and finished 10 seconds quicker. so yeah, it's magical and works well.
Diffstat (limited to 'render/gradient.h')
0 files changed, 0 insertions, 0 deletions