3 ms·
This is a quite interesting discussion actually! Some thoughts: First of all: Theoretical results are actually quite important for real-life performance. It’s
by judofyr 4y ago
This is a quite interesting discussion actually! Some thoughts:
First of all: Theoretical results are actually quite important for real-life performance. It’s possible to write an implementation of bubble sort, have a bunch of benchmarks which shows great performance and 100% test coverage. Yet there are cases where you’ll hit the n^2. The theoretical proof (especially the worst case) are quite important to not get bitten by this. You can search for “accidental quadratic” for plenty of cases where this happens in practice: people have implemented algorithms which works well in practice for small n, but fails (unnecessary) for larger n. A theoretical analysis would have caught this (although probably not worth the engineering effort).
Secondly: “proving” isn’t exclusive to theoretical analysis. I’d argue you can “prove” that a method call in Ruby is slower than a function call in C. You can look at the machine code which gets executed and see that there’s no way for a CPU (regardless of cache, pipelining etc) to execute the Ruby variant faster. There will of course be plenty of assumptions (as there is in theoretical proofs as well!), but in my option it’s a proof nonetheless.
However, to claim that “Kermem is provably 10x faster than FlatBuffers”, I’d say that you need more than a few benchmarks. You’d have to argue that every operational is (at worst) 10x faster.