When to Optimize code? Performance and Memory Optimizations in Python.
by Venkata Ramana (speaking)
- Technical level
Explain when and how to optimize python code.
Code optimizations aren't always necessary. Development effort must be put to get things working well in the first place. Next comes optimization. But some scenarios demand performance! If you are either writing a crawler that needs a fast scraper or parsing an infinite xml file, you need to know how to do write faster and memory efficient python programs. Sometimes, you need to take help from other languages (think C/ C++). Lets take an example scenario and go through code optimizations.
The talk is divided into these sessions:
1. Understand limitations of Strongly typed language (Python).
2. Observe common code patterns (non-optimized code).
3. Identify room for Optimization.
4. Target and Optimize for Speed and Memory.
For this long session (hopefully 2-3 hrs), we will be building a Crawler and Scraper from scratch. And Optimize it as we go along.
- Intermediate - Advanced knowledge of python.
- Laptop with Python, Git Installed. Preferably Linux.
- Also install these development libraries:
a. libcurl4-openssl-dev or libcurl4-gnutls-dev b. libxml2-dev and libxslt-dev
Knowledge Engineer. As a developer at Agiliq, i use Python on a day to day basis.