I tried the Instruments and Sample examples. When I updated drawRect per pg 245, I couldn’t find the sin function. (I don’t think it showed up directly in the list, even with a search.) So I updated my code to loop with i < 2000, and tried again, with dragging many lines to take my time drawing.
I was surprised to see sin show up near the bottom of the list, and showing 0%. Is the compiler (or hardware) optimized from what you used to write the book, perhaps?
This is a good chapter, btw. I confess I jumped ahead because I wanted to see your drawing code, as well as see what these profiling tools are about. I’m surprised there are no other forum comments for this chapter, but it’s nice to be the first.