3 ms·
what I expect to happen now that golang has generics and reports like these will show up is golang will explore monomorphizing generics and get hard numbers. th
by jatone 5y ago
what I expect to happen now that golang has generics and reports like these will show up is golang will explore monomorphizing generics and get hard numbers. they may also choose to use some of the compilation speeds they've gained from linker optimizations and spend that on generics.
I can't imagine monomorphizing being that big of a deal during compilation if the generation is defered and results are cached.
- whimsicalism 5y agoI am unfamiliar with Go. This article discusses that they have decided to go for runtime lookup. Is there any reason why that implementation might make monomorphizing more difficult?
- jatone 5y agonope. it was an intentional trade off with respect to compilation speed. once generics have baked for a bit with real world usage said decision will almost certainly be revisited. edit: for example one could envision the compiler generates the top n specializations per generic function based on usage and then uses the current stuff non-specialized version for the rest.