Reduce execution time of a C program?
1) Use the right algorithms. Look into the Big O efficiency of any algorithms you are using, and make sure there aren't more efficient algorithms available.
2) Think about trading using more memory for a faster algorithm. Perhaps pre-computing tables of intermediate results.
3) Use a profiler to see where the bottle necks are and try improving them.
4) Optimize the inner most loops using assembly language to get the last little bit faster.
5) Run it on a faster computer.
6) Make it run in parallel across many computers or CPUs. This is especially good on the newer Intel chips where you have access to multiple CPUs on one chip. Distributed network computing sometimes is a good idea. Cloud computing is another possibility these days.
7) Make sure that C really is the right answer. It might not be in all cases.
Read more: http://wiki.answers.com/Q/How_do_you_reduce_execution_time_of_a_C_program#ixzz24RwdgPVY