How to calculate the program run time, hehe, a lot of complicated procedures,
First, a simple, qsort algorithm, data? Randomly generated:
See, (Of course, in the case of small amounts of data, not feel the difference, but in the case of large amounts of data, there will be a noticeable feeling.) )
60000000 vs 10000000
There is a difference in time consumption.
[[email protected "ctest]# time. 33hehe:60000000----------------------------------------before quick Sort------------------------------------------------------after quick sort----------------- okreal 0m17.976s user 0m17.246ssys 0m0.150s[[em Ail protected] ctest]# time. / 33hehe:10000000----------------------------------------before quick Sort------------------------------------------------------after quick sort----------------- okreal 0m2.871s user 0m2.627ssys 0m0.030s
span>