Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

FAT Python - A New Static Optimizer for Python 3.6

EuroPython Conference via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore a new static optimizer for Python 3.6 called FAT Python in this conference talk from EuroPython 2016. Discover how runtime guards enable new optimizations without compromising Python's semantics. Learn about various optimization techniques like loop unrolling, constant folding, and removing unused variables. Examine the implementation of guards and an Abstract Syntax Tree (AST) rewriting optimizer. Compare FAT Python's static approach to JIT compilers like PyPy. Understand the proposed Python Enhancement Proposals (PEPs) for integrating FAT Python into CPython 3.6. Gain insights into other optimization efforts for CPython core and the bytecode project for modifying bytecode and implementing a peephole optimizer in pure Python.

Syllabus

Intro
FAT Python New static optimizer for CPython 3.6
Faster Python
New optimizer?
Simplified goal
My previous attempts
Namespace guards
Specialize code
AST Abstract Syntax Tree
AST optimizer
Call builtin functions
Simplify iterables
Loop unrolling
Copy constants
Constant folding
3 Copy to constants Python code: def func(obj): return len obj
(3) Remove dead code if test
PEP 509: dict version • Add a version to Python dict
PEP 510: Specialize def func
PEP 511: Transformer • Add-o command line option
Python 3.6? . Good feedback on the 3 PEPS
Remove unused vars print 1
Copy globals
Function inlining
Profiling • Run the application in a profiler

Taught by

EuroPython Conference

Reviews

Start your review of FAT Python - A New Static Optimizer for Python 3.6

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.