dispatch indirection for function exec
Summary: The type-erased Function is widely used with lambdas and the type of every lambda is unique. Template instantiations are costly for build speed so, for the parts of Function which interact with lambdas, we choose techniques to optimize build speed. In particular, we avoid the extra layer of constructor templates which must be overload-tested and instantiated. The existing design of the extra layer was clean - it effectively used tag-dispatch and was able to deduplicate code with the coercing constructor. However, the choice of techniques was not optimal for build speed. ```name=trunk $ foundation/scripts/run-perf-compile --syntax folly/futures/test/FutureTest.cpp 6,407,492,259 instructions:uP ``` ```name=branch $ foundation/scripts/run-perf-compile --syntax folly/futures/test/FutureTest.cpp 6,303,165,111 instructions:uP ``` Reviewed By: Gownta, ot, luciang Differential Revision: D32940920 fbshipit-source-id: 742cb67b994e7c3e6c070254386f3cdf5dffa38c
Showing
Please register or sign in to comment