4 ms·
In theory, C and assembly will give you the fastest possible implementation. However, in practice, we're just not smart enough to write this code without introd
by rienbdj 7y ago
In theory, C and assembly will give you the fastest possible implementation. However, in practice, we're just not smart enough to write this code without introducing bugs. High level languages allow us to specify what we want the program to do in a concise form and then allow the compiler and runtime to optimize it for us. This works to varying degrees in reality.
A simple example is that pure functions can always be inlined and memoized.