conferences | speakers | series

Analysing the Looping Mechanisms with Python Lists

home

Analysing the Looping Mechanisms with Python Lists
PyCascades-2023

Python has a variety of looping mechanisms for iterables engineered using functions and language keywords. Is it possible that two loops with same complexity have different runtimes? Which mechanism is the fastest and the slowest, Which one should you use to optimize your application?

Python has a variety of looping mechanisms for lists built using functions and language keywords. But each one of them has its pros and cons. A few mechanisms that we’ll cover are: - For Loop - Ranged Loops - Enumerate method - While Loop - List Comprehensions - Generators Expressions - Zip method In this session, we’ll do a deep analysis on various different looping mechanisms, how they operate, and what time and space complexities they carry. We’ll also talk about a run-time of various algorithms and how they perform using these mechanisms. We’ll also go through the comparison between the usage and identify how we can improve the performance of our algorithms by use of different looping mechanisms. **Audience** This tutorial is for Python programmers who are familiar with looping in Python but haven’t fully embraced the complexities of looping mechanisms in Python and cannot comprehend the ideal usage in various circumstances. **Outline:** - Introduction to loops in Python - Describe each loop with an example - What’s happening inside each loop - Which functions are called? What objects are returned? - How memory is managed? - Performance analysis on various different algorithms. - What loop to use in what algorithm - Analysing the target of an algorithm - Categorizing the targets according to each loop - Analyzing the final outcome

Speakers: Syed Ansab Waqar Gillani Syed Muhammad Dawoud Sheraz Ali