Why is MATLAB so fast in matrix multiplication?

This kind of question is recurring and should be answered more clearly than “MATLAB uses highly optimized libraries” or “MATLAB uses the MKL” for once on Stack Overflow. History: Matrix multiplication (together with Matrix-vector, vector-vector multiplication and many of the matrix decompositions) is (are) the most important problems in linear algebra. Engineers have been solving … Read more

Why are loops always compiled into “do…while” style (tail jump)?

Related: asm loop basics: While, Do While, For loops in Assembly Language (emu8086) Fewer instructions / uops inside the loop = better. Structuring the code outside the loop to achieve this is very often a good idea. Sometimes this requires “loop rotation” (peeling part of the first iteration so the actual loop body has the … Read more