Skip to content

Instantly share code, notes, and snippets.

@danlark1
Created April 4, 2022 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danlark1/f3cfc51a8f18a9e2f92ed2b90255ae7d to your computer and use it in GitHub Desktop.
Save danlark1/f3cfc51a8f18a9e2f92ed2b90255ae7d to your computer and use it in GitHub Desktop.
original_stl_comparisons
int main(int argc, char** argv) {
std::cout << "N: comparisons\n";
for (int i = 100; i <= 6400; i *= 2) {
std::cout << i << ": " << quadratic(i) << "\n";
}
return 0;
}
/*
N: comparisons
100: 2773
200: 10623
400: 41323
800: 162723
1600: 645523
3200: 2571123
6400: 10262323
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment