How to test a run-time of a C program
Hi everyone,
I have two little programs I wrote in C. They both do the same thing but the code is different. How would I go about testing which runs faster? |
Try the "time" program. This is probably only useful if your program does not require user input though.
Code:
time ./a.out --Ian |
There's time(1) and the shell builtins "time" and "times". Use "help time" and "help times" to see their descriptions.
|
All times are GMT -5. The time now is 05:19 PM. |