Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "my_lib.h"
- #include <chrono>
- // pastebin.com/WCDKQ7Fd
- using namespace std;
- void test_sort() {
- srand(time(NULL));
- int a[100000];
- for (int k = 0; k < size(a); k++) {
- a[k] = rand() % 10000;
- }
- int sz = (int)size(a);
- cout << "Before: ";
- //show_arr(sz, a);
- auto start_time = std::chrono::high_resolution_clock::now();
- isert_sort(sz, a);
- auto end_time = std::chrono::high_resolution_clock::now();
- std::chrono::duration<double> time = end_time - start_time;
- cout << time.count() << " s to run.\n";
- cout << "After : ";
- //show_arr(sz, a);
- }
- int main() {
- test_sort();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement