Skip to content

Instantly share code, notes, and snippets.

@qtxie
Last active September 16, 2019 05:58
Show Gist options
  • Save qtxie/974420c48d1c9f7011e9441f668e9b46 to your computer and use it in GitHub Desktop.
Save qtxie/974420c48d1c9f7011e9441f668e9b46 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;
// }
// };
// Disable Optimization when compling.
pdqsort qsort
1000000 shuffled_int 1270 1000000 shuffled_int 353
100 shuffled_int 494 100 shuffled_int 134
1000000 shuffled_16_values_int 270 1000000 shuffled_16_values_int 82
100 shuffled_16_values_int 427 100 shuffled_16_values_int 98
1000000 all_equal_int 83 1000000 all_equal_int 29
100 all_equal_int 89 100 all_equal_int 29
1000000 ascending_int 128 1000000 ascending_int 41
100 ascending_int 132 100 ascending_int 40
1000000 descending_int 181 1000000 descending_int 143
100 descending_int 193 100 descending_int 75
1000000 pipe_organ_int 1521 1000000 pipe_organ_int 404
100 pipe_organ_int 589 100 pipe_organ_int 86
1000000 push_front_int 198 1000000 push_front_int 190
100 push_front_int 333 100 push_front_int 71
1000000 push_middle_int 168 1000000 push_middle_int 142
100 push_middle_int 163 100 push_middle_int 59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment