Renderscript c style pointer usage performance issue
问题 In render script, I am using bound pointers to iterate over a large image. The problem is in the array access performance. ... for(int i=0; i < channels; i++) { sum += (input[i*input_size]) * mulValue; } ... For example, when the input_size is 12288 it takes 1.5 seconds to complete script, but when the input_size is 12280 it takes ~0.5 seconds. What can cause such a mystery behavior? 回答1: Understanding the performance implications of what you write in RenderScript (or openCL) is complex. Just