MCPcopy Create free account
hub / github.com/Dobiasd/FunctionalPlus / qsort_vec_int

Function qsort_vec_int

test/benchmark_session_test.cpp:19–25  ·  view source on GitHub ↗

antic C style qsort (will be benchmarked against std::sort)

Source from the content-addressed store, hash-verified

17
18// antic C style qsort (will be benchmarked against std::sort)
19void qsort_vec_int(std::vector<int>& v)
20{
21 auto cmp = [](const void* a, const void* b) {
22 return (*(static_cast<const int*>(a)) - *(static_cast<const int*>(b)));
23 };
24 qsort(v.data(), v.size(), sizeof(int), cmp);
25}
26
27// Benchmarked function : several sub parts of this function are benchmarked separately
28void benchmark_example()

Callers 1

benchmark_exampleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected