+1 -1 +42
Vote on this proposal

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.

Python concepts covered include:
1. Generators.
2. Foreign language interfaces to python like cffi.
3. Python modules like lxml, itertools.


  1. Intermediate - Advanced knowledge of python.
  2. Laptop with Python, Git Installed. Preferably Linux.
  3. Also install these development libraries:
    a. libcurl4-openssl-dev or libcurl4-gnutls-dev b. libxml2-dev and libxslt-dev

Speaker bio

Knowledge Engineer. As a developer at Agiliq, i use Python on a day to day basis.


Login with Twitter or Google to leave a comment →