News for hackers. Stuff that matters.

lamcny

Re:Beating NumPy matrix multiplication in 150 lines of C on Thursday July 04, 2024 @08:25AM (#40874330)
Yes, as far as I can tell the array sizes were large enough to make the wrapping overhead negligible.
Re:Beating NumPy matrix multiplication in 150 lines of C on Thursday July 04, 2024 @08:21AM (#40874309)
Popular does not mean best.

Suppose that this blog post were part of a series that questions the axiom (largely bolstered by academic marketing) that one needs Python to do array computing. Then it is valid to compare C directly to NumPy.

It isn't even far fetched. The quality of understanding something after having implemented it in C is far greater than the understanding gained by rearranging PyTorch or NumPY snippets.

That said, the Python overhead should not be very high if M=1000, N=1000, K=1000 was used. The article is a bit silent on the array sizes, this is somewhere from the middle of the article.