Program run time under Linux

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.