I think I’ve found a solution to an old engineering problem: dynamic method dispatch. It happens when the program decides at runtime which piece of code to run. This mechanism is fundamental to method calls in Javascript and Python and widely used in any OOP programming language (and now even in Rust). I’m explaining all that in depth in the next section of the post.
The goal of this series of posts is to present my solutions so you can poke holes in order to improve it. If you like it, I’ll implement it with production ready code. To be extra-clear, it’s a side project for me I do for fun (i.e. outside of my day job).
My initial results show an average speedup of 5% on real-world programs. Five percent doesn’t sound like much… until you realize it’s the equivalent of half a CPU generation (source).
Because I’ve run these tests from my home often in my pajamas, I invite you to reproduce them and share with me the results.