Fast Networking with Python

What do we mean by 'Fast'?

I/O bound

CPU bound

Our goal

Lazy Optimization

Algorithms

Example: Scheduling

Example: Scheduling

Data Copying

Bad String Concatenation

Do This Instead

Comparision

Lower-level Optimization

buffer() Is Your Friend (Kinda)

buffer() vs. string copy

Writing without buffer()

Writing with buffer()

Improving Python

Buffer API

array.array

Example: Non-copying split()

Sockets and Files

Other Options