Use "auto" with GENERATOR instead of std::function
authorTom Jackson <tjackson@fb.com>
Tue, 28 Nov 2017 01:13:37 +0000 (17:13 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 28 Nov 2017 01:21:54 +0000 (17:21 -0800)
commit2fef5f704ab8cb3fb8f5643a23ae36d32969020d
tree3e1bbd86c0cf5361e1f16cfe234d74acf1c1b571
parent3e19d28a142149241d81c5e736aa4117fe7cbec8
Use "auto" with GENERATOR instead of std::function

Summary: Now that we're using C++14 more broadly, we should use it to improve generator performance. This speeds up a microbenchmark >5x by removing type erasure.

Reviewed By: philippv

Differential Revision: D6398730

fbshipit-source-id: 5809058a3b5ff0e66fd4b1e8954698944e1a7d09
folly/gen/Base.h
folly/gen/test/BaseBenchmark.cpp