Vectorize all the things! Using linear algebra and NumPy to make your Python code lightning fast

Поделиться
HTML-код
  • Опубликовано: 16 июл 2024
  • Vectorize all the things! Using linear algebra and NumPy to make your Python code lightning fast by Jodie Burchell @ JetBrains
    Have you found that your code works beautifully on a few dozen examples, but leaves you wondering how to spend the next couple of hours after you start looping through all of your data? Are you only familiar with Python, and wish there was a way to speed things up without subjecting yourself to learning C?
    In this talk, I will show you some simple tricks, borrowed from linear algebra, which can give you significant performance gains in your Python code, and how you can implement these in NumPy. We’ll start with an inefficient implementation of a machine learning algorithm which relies heavily on loops and lists, and throughout the talk, iteratively replace bottlenecks with NumPy vectorized operations. At each stage, I’ll gently explain the linear algebra behind why these operations are more efficient, making it easy for you to utilize these concepts in your own code. You’ll see how straightforward it can be to make your code many times faster, all without losing readability or needing to understand complex coding concepts.
    The 5th annual Python Web Conf (#PWC2023) inspired attendees to use technology for good. The conference attracted 315 attendees from over 30 countries across 15 time zones. The highly engaging format featured 70 speakers, 5 tracks (including 64 talks and 5 tutorials) and took place virtually on March 13-17, 2023 on LoudSwarm by Six Feet Up.
    More information about the conference can be found at: 2023.pythonwebconf.com
  • НаукаНаука

Комментарии • 1

  • @toxfux
    @toxfux Месяц назад

    Excelent, Thanks!