Entry
-
Having programmed a few ridiculous (I thought) examples of linear algebra gone wild in my C optimization course I thought I would share some insight into what your computer does.
I will not go into the maths much, but matrices and vectors are the foundations of linear algebra. It’s used constantly for rendering graphics, and to find solutions of equations (also happens a lot in virtually every area in your life, but you don’t really think much about it). What you do in linear algebra, are based upon these primary operations in an n-dimensional space.
1.Vector products (two sets of n-coordinates multiplying one by one and summing them up) requires n additions and multiplications.
2.Matrix-vector multiplication (generates a new vector via a dot product operation on each vector element) requires n^2 multiplications and additions, which is tedious on paper even for n>5.
3.Matrix-Matrix multiplication (generates a new matrix via a dot product for each of the n^2 elements) requires n^3 multiplications and additions. This gets tedious on paper for n>3.
We are doing the latter in our project, the heaviest operations, in a space of n=3200 dimensions. That means we are doing 3200^3 multiplications; roughly 33 million operations. Now, we are using these multiplications to somehow calculate some properties of this 3200*3200 matrix (namely the eigenvalues) so we do this (and a bunch of other necessary stuff, but comparatively negligible) and wrap it in a for loop for it to run for 100 iterations.
Get that. Just that matrix, which has 3200*3200 elements, each using 8 bytes of storage, demands a total of around 80MB for itself (not mentioning its factors) and 33 million multiplications to calculate. We do this 100 times; over 3 billion multiplications. This corresponds to 3 gigaflops (3*10^9 floating point operations). A 2008 quadcore CPUs could do 80gigaflops per second! So assuming you do not run out of memory and have one of these new great CPUs; what the fuck does your computer actually do when it lags? It must do something more than 30 times more demanding than that! Your video game must require more than 90 billion multiplications per second to render.
Take a step back and think about the utter insanity that machine you use for your porn is capable of.
for it owns you
