Skip to content

Python, Rust, Cython.. performance.. tell me more

Photo of Alisa Dammer
Hosted By
Alisa D. and Gesa S.
Python, Rust, Cython.. performance.. tell me more

Details

It is about time for the PyLadies Hamburg and PyData Hamburg to meet in real life. In this joint effort we have the pleasure of hosting Alisa Dammer and Stefan Behnel.

--------------------------------------

# First Part: Introduction to Can we speed up Python? with Alisa

We all love python, but we also know that python is not the fastest language there is. Actually it is slow. To speed up your computations different techniques can be applied. One of them is actually to write a program in Rust and import it natively in Python... Wait, what? How does this work? This talk shows how to use rust and python together and how is it in comparison to "native" python techniques

# Second Part: Deepdive in Cython with Stefan

Cython is not only a very fast and comfortable way
to talk to native code and libraries from Python, it is also a widely used
tool for speeding up Python code. The Cython compiler translates Python
code to C or C++ code, and applies many static optimisations that make
Python code run visibly faster than in the interpreter. But even better, it
supports static type annotations that allow direct use of C/C++ data types
and functions, which the compiler uses to convert and optimise the code
into fast, native C. The tight integration of all three languages, Python,
C and C++, makes it possible to freely mix Python features like generators
and comprehensions with C/C++ features like native data types, pointer
arithmetic or manually tuned memory management in the same code.

Tonight, Stefan will give us an intro to Cython and its use. You can learn
how to profile and optimise Python code, and how to beat NumPy's speed by compiling your computational code into fast native binary modules, ready to use them from Python.

• Alisa is one of those super women who can do anything, just listing a few: rust development, simulating the zombie apocalypse in rust, data science at mytaxi, and if need be also a unicorn.
• Stefan is a long-time Python user and core developer of the well-known OSS projects Cython and lxml. He works on big data pipelines at TrustYou and gives lectures and trainings on Cython programming and High-Performance Computing.

• Level:

  • beginner / intermediate

• Food and drinks:

  • yes

• Pre-requisites:

  • your laptop and sudo/admin rights
  • git

• Gender policy
PyLadies aims to provide a friendly support network for women and a bridge to the larger Python world. Anyone with an interest in Python is encouraged to participate! We apply the LadyNerds Code of Conduct (http://bit.ly/LadyNerds-CoC ).

• Contact
Interested in speaking at one of our events? Have a good idea for a Meetup? Get in touch with us at hamburg@pyladies.com

Slack information
Invite: email us for an invite at hamburg@pyladies.com
Slack: https://pyladies-hamburg.slack.com

We follow the LadyNerds Code of Conduct (http://bit.ly/LadyNerds-CoC ) because we are dedicated to providing a safe, inclusive, welcoming, and harassment-free space and experience for all members and guests, regardless of gender identity and expression, sexual orientation, disability, physical appearance, socioeconomic status, body size, ethnicity, nationality, level of experience, age, or religion (or lack thereof). The Code of Conduct exists because of that dedication. We do not tolerate harassment in any form and we prioritise marginalised people’s safety over privileged people’s comfort.

Here is the global PyLadies Code of Conduct (http://www.pyladies.com/CodeOfConduct/ ).

Photo of PyData Hamburg group
PyData Hamburg
See more events
Thoughtworks Germany GmbH
Caffamacherreihe 7 · Hamburg, HH