Benchmark MATLAB & Julia for Matrix Operations

In order to analyze your claims I did as following.
I created the following Julia file - RunTimeValidation.

It evaluates 4 ways to calculate a function run time:

  1. Use of the method I used in my project. Use @elapsed method per iteration. Save each iteration result to array. Use 7 iterations. It yielded minimum run time of 1.4199402 [Sec]. In my project I use median() yet in this I use minimum() in order to match what’s done in BenchMarkTools.jl I will compare to.
  2. Use the method described in (1) just use 70 iterations instead of 7. In order to see if 7 gets stable enough. It yielded run time of 1.417183299 [Sec].
  3. Use @belapsed macro from BenchmarkTools.jl. It yielded run time of 1.418070099 [Sec].
  4. Use @btime macro from BenchmarkTools.jl. It yielded run time of 1.419 [Sec].

Methods (1)-(3) was executed within a function (The timed called).
Method (4) was executed with variable interpolation.

I ran the same program with smaller matrix size (100) to see if results are stable in that case as well (Small run time).
They were.

I ran it for Matrix size of 10, those are the results:

  1. 64.5 [Micro Sec].
  2. 65.1 [Micro Sec].
  3. 64.3 [Micro Sec].
  4. 64.8 [Micro Sec].

Since all methods turned to be stable within single digits of % I am pretty sure the method I used is valid.

Now, I think we can stop talk about the way time was measured and focus about the results.