10-18, 14:00–14:30 (Europe/Lisbon), Auditorium
Dive into the world of Lazy Evaluation with Python generators! 🚀 Uncover the efficiency secrets, learn practical implementations, and revolutionize your coding approach. Join me in exploring the power of optimization and enhanced performance. Ready to elevate your Python game?
Introduction
Lazy evaluation is a powerful concept in computer science that can be used to optimize the performance of programs by reducing the amount of computation needed to produce results. In Python, one way to implement lazy evaluation is through the use of generators, which are functions that can be paused and resumed during execution to generate a sequence of values on-the-fly.
In this talk, we will explore the concept of lazy evaluation with generators in Python. We will start with a brief overview of generators and then delve into the principles of lazy evaluation, including how it works and its advantages over eager evaluation. We will also cover practical examples of how generators can be used to implement lazy evaluation in real-world scenarios, such as processing large datasets or generating infinite sequences.
Attendees of this talk will gain a deeper understanding of the concept of lazy evaluation and how it can be implemented using generators in Python. They will learn about the benefits of lazy evaluation, including improved performance and reduced memory usage, and see practical examples of how it can be used to solve common programming problems. This presentation is designed for developers who are interested in optimizing their Python code and want to explore the power of lazy evaluation with generators.
Timeline
Introduction (3 minutes): Introduce myself and give a brief overview of the talk's topic and goals. We'll explain why lazy evaluation and generators are important for optimizing Python code, and outline the structure of the talk.
Background (7 minutes): Explain the principles of lazy evaluation and how it differs from eager evaluation. Also, explain generators and their role in implementing lazy evaluation in Python, and compare lazy and eager evaluation in terms of performance and memory usage.
Getting Started with Generators (7 minutes): Explain how to define and use generators in Python. Demonstrate how to use generators to generate sequences on-the-fly and discuss the advantages of generators over other sequence types like lists or tuples.
Practical Examples (10 minutes): Demonstrate how generators can be used to solve real-world programming problems. Give examples of processing large datasets, generating infinite sequences, or implementing lazy evaluation in iterative algorithms, and discuss how lazy evaluation can improve performance and reduce memory usage in these scenarios.
Conclusion (3 minutes): Recap the talk's main points, give final thoughts on the benefits of using lazy evaluation and generators in Python, and Q&A time
Intermediate
What are the main topics of your talk? –Generators, Lazy Evaluation, Functional Programming, Performance Improvement
I am Sebastian Arias, an Ecuadorian Software Engineer with 5 years of experience in Python web development, TDD, and FP. As a Senior Developer and Consultant for a US based company, I have worked extensively with US-based companies, and my passion lies in helping people explore new ideas and adopt code best practices. When I'm not coding, you can often find me blending my own coffee mix. As a coffee enthusiast, I take the 'bean to cup' journey quite seriously!