third_party_benchmark/test
Leo Koppel fa341e51cb Improve BM_SetInsert example (#465)
* Fix BM_SetInsert example

Move declaration of `std::set<int> data` outside the timing loop, so that the
destructor is not timed.

* Speed up BM_SetInsert test

Since the time taken to ConstructRandomSet() is so large compared to the time
to insert one element, but only the latter is used to determine number of
iterations, this benchmark now takes an extremely long time to run in
benchmark_test.

Speed it up two ways:
  - Increase the Ranges() parameters
  - Cache ConstructRandomSet() result (it's not random anyway), and do only
    O(N) copy every iteration

* Fix same issue in BM_MapLookup test

* Make BM_SetInsert test consistent with README

- Use the same Ranges everywhere, but increase the 2nd range
- Change order of Args() calls in README to more closely match the result of Ranges
- Don't cache ConstructRandomSet, since it doesn't make sense in README
- Get a smaller optimization inside it, by givint a hint to insert()
2017-10-31 11:00:39 -07:00
..
basic_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
benchmark_test.cc Improve BM_SetInsert example (#465) 2017-10-31 11:00:39 -07:00
CMakeLists.txt Add macros for create benchmark with templated fixture (#451) 2017-10-09 21:10:37 +02:00
complexity_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
cxx03_test.cc Add macros for create benchmark with templated fixture (#451) 2017-10-09 21:10:37 +02:00
diagnostics_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
donotoptimize_test.cc Fix #342: DoNotOptimize causes compile errors on older GCC versions. (#398) 2017-06-02 15:47:23 -07:00
filter_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
fixture_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
map_test.cc Improve BM_SetInsert example (#465) 2017-10-31 11:00:39 -07:00
multiple_ranges_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
options_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
output_test_helper.cc Trying again to fix error caused by -Wunused-function. 2017-05-03 00:05:15 +01:00
output_test.h Improve some comments. 2017-05-01 23:02:35 +01:00
register_benchmark_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
reporter_output_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
skip_with_error_test.cc Fix and document SkipWithError(...) using ranged-for loop. 2017-10-17 10:24:13 -06:00
templated_fixture_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
user_counters_tabular_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
user_counters_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00