How to Sum Like a Boss (Almost) Σ

In a recent post, I presented how memory layout may influence a matrix summing speed. It’s interesting to see that there are plenty of pitfalls we might fall into when writing sum function and memory layout is not the only one. Please first read the previous post on summing if you haven’t already.

Without thinking why, let’s take a look at those two functions:

Read more →

Speed of Traversing Matrix → vs ↓

Today I would like to mention a low-level peculiarity I was taught in highschool, but passed over during my studies. Why it differs whetter matrix is traversed by rows or columns? # Even though we think of a matrices as a two dimensional creatures, inside a computer they have to be stored as a sequence of numbers. Therefore there are two schemas one can follow, row-first and column-first. Historically they are called C-style and Fortran-style respectively.
Read more →