What causes the periodic performance spikes that are seen when doing computationally expensive array processing on the Nexus 4?

view full story

http://stackoverflow.com – I'm new to threads (don't kill me for my implementation below :) and I need to do multiple blurring passes of pixels on a separate thread (see below). It's not the most efficient implementation of box blur (it's from Gaussian Filter without using ConvolveOp) but the performance spikes don't occur on the Nexus 7 tablet but they do occur on the Nexus 4 phone. I've posted my testing sample (running on Android 4.2 - see below). I don't think it is caused by the GC thrashing the memory (it doesn't coincide with the spikes). I think it might be something to do with cache locality or hardware mem (HowTos)