When to Optimize code? Performance and Memory Optimizations in Python.
by Venkata Ramana (speaking)
Objective
Explain when and how to optimize python code.
Description
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.
Requirements
- 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
Speaker bio
Knowledge Engineer. As a developer at Agiliq, i use Python on a day to day basis.
1
▼
So Do I need to carry laptop (with Git installed) at PyCon?
1
▼
At this workshop, you will have hands on work. It helps you do any exercise(s).