Does a sorted array run faster than an unsorted array in Java?
In this video, Brian L. Gorman uncovers the relationship between efficiency and branch prediction when executing arrays in Java.
On the surface, it may appear that sorted arrays run faster than non-sorted arrays. Many novice developers would be surprised to learn that this is not the case. In this video Brian L. Gorman proves the close similarity in execution time between sorted and unsorted arrays, and demonstrates how the efficiency of branch prediction can be vastly improved when coupled with a check condition.
Sign up for Safari now and get 10 days of free access to more Java training.
Brian L. Gorman is an experienced .NET developer, certified as an MCSD in C# .NET. Holding a Masters of Science in computer information systems, he has many years of experience instructing college-level SQL database, C#, VB.NET, Java, and Microsoft Office courses. Brian has also authored a number of full video courses on these subjects.