cf = With[{ mandel = Block[{z = #, c = #}, Catch@Do[If[Abs[z] > 2, Throw@i]; z = z^2 + c, {i, 100}]] & }, Compile[{},Table[mandel[y + x I], {x, -1, 1, 0.005}, {y, -2, 0.5, 0.005}]] ]; ArrayPlot[cf[]]