Skip to content

Instantly share code, notes, and snippets.

@frhd
Created December 10, 2013 15:57
Show Gist options
  • Save frhd/7892966 to your computer and use it in GitHub Desktop.
Save frhd/7892966 to your computer and use it in GitHub Desktop.
c++ cycle clocking
clock_t start = clock();
for (int it = 0; it < 1000000; ++it)
foo(s);
printf("foo took %i cycles\n", clock() - start);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment