projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Introducing folly::Function
[folly.git]
/
folly
/
test
/
function_benchmark
/
benchmark_impl.cpp
diff --git
a/folly/test/function_benchmark/benchmark_impl.cpp
b/folly/test/function_benchmark/benchmark_impl.cpp
index 0a6a9320775d41993b19cbb9de8883220c8d0709..cd2ed94257b7994bd57a714d02646df017b43a2e 100644
(file)
--- a/
folly/test/function_benchmark/benchmark_impl.cpp
+++ b/
folly/test/function_benchmark/benchmark_impl.cpp
@@
-36,6
+36,13
@@
void BM_std_function_invoke_impl(int iters,
}
}
+void BM_Function_invoke_impl(int iters,
+ const folly::Function<void() const>& fn) {
+ for (int n = 0; n < iters; ++n) {
+ fn();
+ }
+}
+
void BM_mem_fn_invoke_impl(int iters,
TestClass* tc,
void (TestClass::*memfn)()) {