Commit 6ca3a7f7 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Cut no-op same-type casts in Function benchmark

Summary: [Folly] Cut no-op same-type casts in `Function` benchmark.

Reviewed By: LeeHowes

Differential Revision: D17432433

fbshipit-source-id: 6c2e53fc742aa590f7332efa146af41592274cc9
parent d7808b52
......@@ -64,7 +64,7 @@ void runSmallInvokeBenchmark(std::size_t iters, MakeFunction make) {
auto func = make(lambda);
folly::makeUnpredictable(func);
for (auto i = std::size_t{iters}; --i;) {
for (auto i = iters; --i;) {
folly::doNotOptimizeAway(func(i));
}
}
......@@ -77,7 +77,7 @@ void runSmallCreateAndInvokeBenchmark(std::size_t iters, MakeFunction make) {
};
folly::makeUnpredictable(lambda);
for (auto i = std::size_t{iters}; --i;) {
for (auto i = iters; --i;) {
auto func = make(lambda);
folly::makeUnpredictable(func);
folly::doNotOptimizeAway(func(i));
......@@ -100,7 +100,7 @@ void runBigAndInvokeBenchmark(std::size_t iters, MakeFunction make) {
folly::makeUnpredictable(func);
suspender.dismissing([&] {
for (auto i = std::size_t{iters}; --i;) {
for (auto i = iters; --i;) {
folly::doNotOptimizeAway(func(i));
}
});
......@@ -120,7 +120,7 @@ void runBigCreateAndInvokeBenchmark(std::size_t iters, MakeFunction make) {
folly::makeUnpredictable(lambda);
suspender.dismissing([&] {
for (auto i = std::size_t{iters}; --i;) {
for (auto i = iters; --i;) {
auto func = make(lambda);
folly::makeUnpredictable(func);
folly::doNotOptimizeAway(func(i));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment