2022-05-26 –, Main Room
Type annotations are documentation. They're meant for humans to quickly figure out what arguments a given function accepts and what it returns. But can this information be utilized by Python to make code run faster? Yes and no!
In this talk, we'll cover a few methods of optimizing code using type annotations. We'll talk about why good human-readable types aren't the same as types that a machine would want to get to optimize. We'll look at real-world optimized Cython code from EdgeDB, and real-world code compiled with mypyc (the Black auto-formatter).
python
Łukasz is equally interested in music and software engineering, as a classically-trained pianist and a long-time contributor to the Python programming language. He works as the CPython Developer in Residence, and serves as the Release Manager for Python 3.8 and 3.9. He created the popular code auto-formatter Black.
Apart from Python, Łukasz builds software for musical instruments and makes music as RPLKTR. Ex-Facebook. Currently based in Poznań.