by webdevver · 3y ago · 0 comments
sort of what javascript engines do already (as I understand it anyway), but apply it to actual binary code.
It doesn't work online on the running code, but does on already compiled binaries. You can't move things after loading, without the application helping you, because the function pointers may be saved already. But you could optimise between runs.
Alternatively, jits can already do pgo.
There’s a video that describes how it works, although it focuses more on devirtualization and inlining rather than basic block reordering (which .NET also does, it’s a “proper” PGO implementation): https://youtu.be/WrpYcGic9b8?si=sLKAi-bpzDevgswx