basedOpinionated utility library |
git clone git://git.dimitrijedobrota.com/based.git |
Log | Files | Refs | README | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING | |
instrumentation.cpp (493B)
1 #include <algorithm> 2 3 #include "based/instrumentation.hpp" 4 5 int main() 6 { 7 { 8 const based::timer time; 9 10 based::count_operations( 11 16UL, 12 16UL * 1024 * 1024, 13 [](const auto& a, const auto& b) { std::sort(a, b); }, 14 based::normalize_nlogn); 15 } 16 17 { 18 const based::timer time; 19 20 based::count_operations( 21 16UL, 22 16UL * 1024 * 1024, 23 [](const auto& a, const auto& b) { std::stable_sort(a, b); }, 24 based::normalize_nlogn); 25 } 26 }