3 ms·
Try this: http://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array http://stackoverflow.com/questions/1122780
by rkangel 11y ago
Try this:
http://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array http://stackoverflow.com/questions/11227809/why-is-processin...
Have a look at the "Update" to the top answer, specifically what the intel compiler does.
- bathory 11y agoIt should be noted though, that the actual branch prediction comes from the CPU, not the compiler.