Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore techniques for improving Python startup speed in this conference talk from EuroPython 2018. Learn about the challenges of cPython's startup time increasing linearly with imported modules and discover an innovative approach to optimize performance. Delve into the method of embedding code objects from .pyc files directly into the cPython binary's data segment, eliminating the overhead of reading and un-marshalling at startup. Understand how this technique, similar to image-based languages like Smalltalk, can make module loading as efficient as pointer dereferencing. Follow along as the speaker discusses the implementation process for Python 3.6, challenges faced, benchmark results, and potential future developments. No prior experience with cPython internals is required to grasp the concepts presented in this insightful 28-minute talk.