Measure code improvements across versions
It is always nice to say that MATLAB got faster. That being said given the wide variety of applications it is hard to generalize. VersionBay creates a dedicated performance analysis of your code across different versions. It is also the platform to show and validate better programming techniques when optimizing for performance.
function a = qsort_kernel(a, lo, hi) i = lo; j = hi; while i < hi pivot = a(floor((lo+hi)/2)); while i <= j while a(i) < pivot, i = i + 1; end while a(j) > pivot, j = j - 1; end if i <= j t = a(i); a(i) = a(j); a(j) = t; i = i + 1; j = j - 1; end end if lo < j; a=qsort_kernel(a, lo, j); end lo = i; j = hi; end
There are many variables when looking at performance such as the hardware specifications of each machine, what other programs are running, battery level on laptops, etc… To make things even more complicated, MATLAB itself takes slightly different times when running the exact same code under exact same conditions. VersionBay shows box plots of running the same code multiple times to illustrate the variance of these multiple runs. The chart shows, min, max, median and the quartiles of the multiple runs. When calculating performance improvements, VersionBay uses median values.
The new MATLAB execution engine includes performance improvements to function calls, object-oriented operations, and many other MATLAB operations.MATLAB R2015b Release Notes
Looking at this code that was used to generate the chart one may quantify the release note comment in R2015b. Often it is hard to know or measure the improvement of code, so when Advancing code it is good to validate if this indeed is leveraging built in capabilities that could make a big difference in the way one programs in MATLAB.
Get Started Now by Contacting Us