"Second week" "Job three" performance test

Source: Internet
Author: User

Effectiveness Analysis: Never used tools to test the performance of the process sequence, previously only on the performance of the program in the theoretical analysis, what time complexity, space complexity and so on. Only have a very superficial understanding to affect the program performance. It is considered that the multi-loop layer has low performance and low performance of recursive algorithm. Today I actually used the vs2013 tool to look at the performance of the program.

Originally I only have dev C + + This lightweight IDE use, performance analysis of this function although there seems to be not very good, in order to complete the job, the format of the hard disk, re-allocation of disk space and other methods installed on the vs2013.

1. The performance and diagnostic tools in the analysis in vs2013 are used.

Choosing CPU usage seems a bit of a bug, so select the fourth item and use the Performance Wizard for performance analysis.

2. Perform a performance analysis for the first time.

500k txt is processed, the runtime is 3.6 seconds, and the functions are like this.

_rtc_checkesp This function in my program is not at all, is the system generated by itself. In addition, do not know what reason, feel vs to C support is not as friendly as C #, do not know whether it is my version of the problem or I am under the software has a problem.

The result was a bit strange, and after looking, I changed the bubble sort to a quick sort.

3, followed by a second analysis.

You can see that the total execution time has dropped to 2.8 seconds.

Don't know how, the result is very strange.

Anyway, the program has been improved after the time is shortened, although the feeling vs display results a bit of a bug, but the display of time results are reliable, continue to learn later, using more advanced language, such as C # and so on, to see if there can be better results.

"Second week" "Job three" performance test

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.