Some minor optimizations for speeding up nearest neighbor resize. (#8444)
* Some minor optimizations for speeding up nearest neighbor resize.
By removing loop over channels. Impact mainly visible for more than 3
channels. Numbers for benchmark with 6 channels:
Before:
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 53222200 100
280.7M items/s
After:
Benchmark Time(ns) Iterations
--------------------------------------------------------------------
BM_Resize_ResizeNearestNeighbor_cpu_10_499_499 44504450 100
335.7M items/s
* Simplified implementation in accordance with jhseu@ comments.
Loading
Please sign in to comment