I have a block of code that's essentially:
for(int i=0;i<aInt;i++){
CGPoint points[2] = {CGPointMake(i,0),CGPointMake(i,bArray[i])};
CGContextStrokeLineSegments(myContext, points, 2);
}
which is causing a bit of a bottleneck when aInt gets large, as it's likely to do in my case. I don't know enough about quartz 2d to know how to best optimize this. Is it better to create a single huge point array in the loop and then stoke the entire array once?
Or more ideally, I've just optimized a different part of code dealing with arrays. In doing so, I converted to using C-style arrays which sped things up tremendously. Is there a similar low-level way of doing the above?
Thanks!