▲ | titzer 9 hours ago | |||||||
This is why it's imperative that inline caches learn and adapt to the observed behavior. As long as learning is cheap, identifies profitable cases effectively, and backs off for polymorphic and megamorphic scenarios, it's a win. VM implementer intuition only goes so far, and as the internet is the greatest fuzzer invented, you're definitely going to encounter programs that break your best laid plans. | ||||||||
▲ | munificent 7 hours ago | parent [-] | |||||||
> This is why it's imperative that inline caches learn and adapt to the observed behavior. True, but if you only have a single bottleneck cache site for all constructor invocations across the program, the only reasonable thing that callsite can learn is "wow, every single constructed class goes through here". That's why it makes sense to have a separate cache at every `.new()` location. | ||||||||
|