3 ms·
Loved this write up. Of course the usual caveats with this level of optimization apply, and in general we should be aiming to optimize for human readability. Bu
by seabass 2y ago
Loved this write up. Of course the usual caveats with this level of optimization apply, and in general we should be aiming to optimize for human readability. But if nothing else I think it’s a good thing to get a better internal understanding of how the interpreter works.
With that in mind, it’d be interesting to see the relative costs of each deoptimization to the others. For example, is a monomorphic->polymorphic deopt an order of magnitude worse than an unnecessary string mutation? In nanoseconds, what’s the actual cost of each of these? Because there are certainly going to be some optimizations that matter much more than others.