“The sort function is now faster when sorting numeric matrices or multidimensional arrays.”

MATLAB R2018b release notes

VersionBay looked at the performance of the built-in sort function across multiple versions of MATLAB and decided to try and quantify how much faster it became.

To ensure consistency VersionBay used Windows 7, as this version of Windows supports all the MATLAB releases in the chart below. The chart below shows the box plot, where the whiskers show min and max of the results and the box is the 1st and 3rd quartile of running multiple times the same code. When quantifying improvements VersionBay chose to look at the median represented by the black line in the middle of the box. Box plots illustrate a more complete view of multiple execution times of the same code.

VersionBay Performance report of the MATLAB Sort function over multiple MATLAB Versions.

The built-in function sort in R2018b is 2.3x faster than R2018a.

VersionBay tested the sort function with datatypes double, single, int32 and int64. The chart above shows the results for the sort function with double precision datatype. The other numeric datatypes showed similar improvements. However, when using an array of strings as input there is no significant improvement across releases.