Thinking about it, if you’re designing your own small matrix multiplication library (i.e. reinventing the wheel)
I thought of this example because a fundamental improvement was actually made with the help of AI recently. 4x4 in specific was improved noticeably IIRC, and if you know a bit about matrix multiplication, that ripples out to large matrix algorithms.
PS: Not a personal critical
I would not actually try this unless I had a reason to think I could do better, but I come from a maths background and do have a tendency to worry about efficiency unnecessarily.
I think in most cases (matrix multiplication being probably the biggest exception) there is a way to write an algorithm that’s easy to read, especially with comments where needed, and still approaches the problem the best way. Whether it’s worth the time trying to build that is another question.
I thought of this example because a fundamental improvement was actually made with the help of AI recently. 4x4 in specific was improved noticeably IIRC, and if you know a bit about matrix multiplication, that ripples out to large matrix algorithms.
I would not actually try this unless I had a reason to think I could do better, but I come from a maths background and do have a tendency to worry about efficiency unnecessarily.
I think in most cases (matrix multiplication being probably the biggest exception) there is a way to write an algorithm that’s easy to read, especially with comments where needed, and still approaches the problem the best way. Whether it’s worth the time trying to build that is another question.