Skip to content
Browse files

Enable taking the count from a command line for benchmarking

  • Loading branch information...
1 parent 65db6c9 commit d5d1d3bd609e7151f85bb88928b2c9a64bacf39c @armon armon committed Apr 16, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 main.c
View
3 main.c
@@ -14,6 +14,9 @@ int main(int argc, char** argv) {
// Maximum
int count = 10000000; // 10M
+ if (argc > 1)
+ count = atoi(argv[1]); // Get the count as an argument
+ printf("Sorting array of %d random entries.\n", count);
// Allocate a key and value
int* key = (int*)malloc(count*sizeof(int));

0 comments on commit d5d1d3b

Please sign in to comment.
Something went wrong with that request. Please try again.