(Wangle) Allocate lambda space inside Core instead of inside std::function
Summary: Taking this trick that is used in the fibers library. We can keep 64 bytes of space inside `Core` to allocate the callback lambda into, instead of having `std::function` do another `malloc`. This seems to greatly improve the synthethic benchmark, and hopefully production workloads, too, by reducing the number of mallocs. 64 bytes were picked because it fits all the lambdas in the futures tests. We might want to adjust this based on production data...? https://fb.intern.facebook.com/groups/715931878455430/permalink/837898842925399/ Test Plan: Run all the tests for all platforms, compilers, and Windtunnel. Reviewed By: hans@fb.com Subscribers: chalfant, meisner, folly-diffs@, jsedgwick, yfeldblum FB internal diff: D1931620 Signature: t1:1931620:1427841595:6ec667b58980be232dfb116bc316148bb67de4fc
Showing
Please register or sign in to comment