I've really warmed up to @jckarter's suggestion of using template instantiation for hot generic functions and an interpreter for cold generic functions. You often want an interpreter for your language anyway, so it's an elegant way to reduce code bloat.
-
-
I have a theory that type-based PGO could be more stable across codebase changes than traditional conditional-level PGO, so might be easier to deploy for guiding specialization
-
So you instrument the program to record which all instantiated type specializations, as well as the substitution map that each generic function was called with, and then pre-specialize those in the release build?
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.