diff options
author | 2016-03-09 08:56:43 -0800 | |
---|---|---|
committer | 2016-03-09 15:46:25 -0800 | |
commit | 29144058526b0e5a40f56629dca5f085177f72b6 (patch) | |
tree | fa1dc2a15a8ee9eb7588da380c73ed51e54e45a2 /util/python | |
parent | a04bfaed3aa8522f023f91700bb8a33f587ea6ee (diff) |
Speed up bicubic image resizer op by >2x and make it more readable. Add benchmark.
The main improvements are from hoisting the calls to round() out of the inner loop. Doing the same for the branching associated with Bound() helped as well.
Benchmark Base (ns) New (ns) Improvement
------------------------------------------------------------------
BM_ResizeBicubic_8_32_3_cpu 202216 107560 +46.8%
BM_ResizeBicubic_8_128_3_cpu 3204907 1553875 +51.5%
BM_ResizeBicubic_8_512_3_cpu 54429960 23692225 +56.5%
BM_ResizeBicubic_8_1024_3_cpu 213123226 100337863 +52.9%
BM_ResizeBicubic_16_32_3_cpu 430895 187253 +56.5%
BM_ResizeBicubic_16_128_3_cpu 6400237 2895209 +54.8%
BM_ResizeBicubic_16_512_3_cpu 107684898 50523520 +53.1%
BM_ResizeBicubic_16_1024_3_cpu 430328035 199611402 +53.6%
BM_ResizeBicubic_32_32_3_cpu 798482 393660 +50.7%
BM_ResizeBicubic_32_128_3_cpu 12801170 5724573 +55.3%
BM_ResizeBicubic_32_512_3_cpu 212660551 100254750 +52.9%
BM_ResizeBicubic_32_1024_3_cpu 854097176 401780057 +53.0%
Change: 116768714
Diffstat (limited to 'util/python')
0 files changed, 0 insertions, 0 deletions