Skip to content

Instantly share code, notes, and snippets.

@qtxie
Last active September 16, 2019 05:59
Show Gist options
  • Save qtxie/8accc4d2ac9f872eb74cddd42042928a to your computer and use it in GitHub Desktop.
Save qtxie/8accc4d2ac9f872eb74cddd42042928a to your computer and use it in GitHub Desktop.
// Source Code: https://gist.github.com/qtxie/12c087db8a2c0c2d9fe0104af2f4236e
// compare Cell struct
// struct Cell {
// int header;
// int pading;
// int value;
// int pading2;
// Cell(int x) : value(x) {}
// bool operator<(const Cell& r) const
// {
// return value < r.value;
// }
// };
pdqsort qsort
1000000 shuffled_int 121 1000000 shuffled_int 331
100 shuffled_int 37 100 shuffled_int 108
1000000 shuffled_16_values_int 26 1000000 shuffled_16_values_int 54
100 shuffled_16_values_int 33 100 shuffled_16_values_int 72
1000000 all_equal_int 4 1000000 all_equal_int 6
100 all_equal_int 2 100 all_equal_int 7
1000000 ascending_int 4 1000000 ascending_int 10
100 ascending_int 2 100 ascending_int 9
1000000 descending_int 6 1000000 descending_int 114
100 descending_int 3 100 descending_int 45
1000000 pipe_organ_int 52 1000000 pipe_organ_int 395
100 pipe_organ_int 9 100 pipe_organ_int 60
1000000 push_front_int 6 1000000 push_front_int 181
100 push_front_int 6 100 push_front_int 49
1000000 push_middle_int 5 1000000 push_middle_int 133
100 push_middle_int 3 100 push_middle_int 35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment