dwatteau / scummtr

Fan translation tools for SCUMM engine games
MIT License
23 stars 4 forks source link

fix: Remove wasteful virtuals for functions with no override #39

Closed dwatteau closed 2 years ago

dwatteau commented 2 years ago

Some useless virtual found with the new SizeBench tool from Microsoft.

They're "wasteful" in that they are functions with zero or a single override, so we can avoid the cost of virtual.

(Ideally) needs various compiler tests, file size and speed comparisons, and analysis, in order to avoid any possible regression.

dwatteau commented 2 years ago

Can't see any regression.

Binaries are a tiny bit smaller; speed appears to be the same.

Let's go for it.