[swift-evolution] Specialization of functions with default parameters or discardable result

张国晔 cc941201 at me.com
Tue Apr 26 05:40:49 CDT 2016


Functions in Swift can have default parameters or discardable result, but without inlining, calling them could be suboptimal in performance.

I propose a solution which compiler generates specializations of those functions, hence more optimization can be performed for specific usage.

This can also be used to solve binary compatibility when new parameters are added to a function.


Draft:
https://github.com/cc941201/swift-evolution/blob/master/proposals/NNNN-function-specialization.md


More information about the swift-evolution mailing list