iOS Concurrency - Not reaching anywhere's near theoretical maximum
I'm new to Grand Central Dispatch and have been running some tests with it doing some processing on an image. Basically I'm running a grayscale algorithm both sequentially and using GCD and comparing the results. here is the basic loop: UInt8 r,g,b; uint pixelIndex; for (uint y = 0; y < height; y++) { for (uint x = 0; x < width; x++) { pixelIndex = (uint)(y * width + x); if (pixelIndex+2 < width * height) { sourceDataPtr = &sourceData[pixelIndex]; r = sourceDataPtr[0+0]; g = sourceDataPtr[0+1]; b = sourceDataPtr[0+2]; int value = (r+g+b) / 3; if (value > MAX_COLOR_VALUE) { value = MAX_COLOR