I would like to measure branch prediction fails on Xcode for Intel processors on Mac OS X, with the obvious intent of speed optimization.
Is there a way to program XCode's Instruments in order to achieve this?
I have already checked, and this information is unfortunately not present in Xcode documentation. I suspect this could be achieved with some custom setting.
The purpose is identifying optimization problems such as this one: Why is it faster to process a sorted array than an unsorted array?
I am aware that an Intel commercial solution exists, for Intel Processors running on Linux and Windows. On OS X you can apparently only monitor a remote Intel processor running on a Linux or Windows system.
Rather than a commercial tool, I would prefer a way to set/program Xcode and Apple tools to gain at least a minimum of visibility on this issue.