Remix.run Logo
▲ nwallin 2 hours ago

The algorithm exists that scales with O(n^9/4), but it is not useful. It's only faster than Strassen for problems so large, k n^9/4 is simply too much time, the k is simply too large. If you have to multiply matrices so large that the O(n^9/4) algorithm is faster than Strassen, you will have to wait longer than the lifetime of the universe to do it.

Additionally, there's a disconnect between the theory and the practice. In theory, the number of operations you're trying to minimize is the number of scalar multiplications. In practice, matrix multiplication these days is done on GPUs. GPUs don't benefit from minimizing the number of raw arithmetic operations so much as they benefit from minimizing memory movement. Any changes that make your GPU memory's life easier is going to make your matrix multiplication algorithm faster, any changes that make its life harder is going to make it slower. The O(n^3) algorithm that just takes the dot product of matrix A's rows and matrix B's columns makes your GPU memory's life really easy.

I don't know whether the O(n^9/4) is ill-conditioned, although it almost certainly is. (asymptotically fast algorithms generally speaking have worse conditioning than the naive algorithm) This will only get worse with large matrices, which is the whole point of these asymptotically fast algorithms in the first place.

▲hinkley an hour ago | parent [-]

I still maintain that Knuth served us well for about 5 orders of magnitude increase in compute and who can really expect more than that?

We need a new notation for the next 3 orders of magnitude and arguably the last two that accounts for physics. There is not any such thing as an O(1) memory lookup. There really never was. They were O(k) and k was fixed for each model of computer, but not between them, which makes it not a constant that you can eliminate.

In an age where we have Cloudflare bragging about eliminating a TERABYTE of memory from a problem domain, not once but twice, you're talking about speed of light delays outpacing nlogn.

There are already a bunch of algorithms we use, for instance, which complicate hashtables with an additional logn term and achieve substantial speedups over a naive algorithm, because of memory topology. And we don't have a way to express that except via tech blog.

▲nwallin 32 minutes ago | parent [-]

I agree completely.

We have computer science, the theoretical discipline that is most closely related to math. And we have computer science, the engineering discipline that is most closely related to electrical engineering. We give these disciplines the same name, even though they typically have precious little to do with each other. These two disciplines don't agree on what the word "fast" means. While this isn't necessarily a bad thing, and it's not as if one is right and the other is wrong, it's something we need to keep in our minds when we talk about these things.