Python Data Large performance analysis

Source: Internet
Author: User

Premise: If you have a hundreds of m file that needs to be parsed, a function needs to run many times (thousands of times), you need to consider performance issues

Performance Analysis module: CProfile

How to use: Cprofile.run ("func ()"), where Func () is a function for profiling

Test results: The results show how long each function was written, and when the built-in function was run

Analyze functions that run more times and take a lot of time to optimize, such as: regular expression matching is time consuming, you can combine multiple regularization into one

Python Data Large performance analysis

Related Article

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.