14 ms·
Because those are conflicting requirements. Let's make an example, you want to multiply two n-by-n matrices, A and B. Easy enough. Wait, is either A or B Hermi
by qsort 2y ago
Because those are conflicting requirements. Let's make an example, you want to multiply two n-by-n matrices, A and B. Easy enough.
Wait, is either A or B Hermitian? If so we can do better.
Is either of them symmetric? Is either of them triangular? Where do you want to allocate them? Do you want to overwrite either of them or you want a new matrix? If so, how are you going to allocate that memory? Would you like to fuse-multiply-add with your order?
Python's answer is "shut up nerd, just A@B". Necessarily you are going to lose some control over the execution.
Different languages take different tradeoffs on the "simple specification vs. detailed control over execution" scale.