Faster Python apps

Faster Is Better

© Lead Image © Tomasz Pacyna, 123RF.com

© Lead Image © Tomasz Pacyna, 123RF.com

Article from Issue 246/2021
Author(s):

PyPy and Nuitka improve the performance of Python on a Raspberry Pi.

Python apps on lower-end hardware like Raspberry Pis can be a bit slow, but luckily you have some options that can improve their performance. A number of interesting packages allow you to compile, interpret, or repackage your Python apps. In this article, I highlight two packages that have given me good success:

  • PyPy [1] – a replacement to the native Python interpreter that runs more than four times faster
  • Nuitka [2] – a native Python utility to compile Python apps to C code

How a Python application performs is based on a lot of different factors, so it's important to know the limitations and how best to work with them. PyPy and Nuitka might not work for all applications, but for many common types of projects they are great fits.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • OpenWrt on a Pi

    Light open source router firmware breathes new life into your old Raspberry Pi.

  • A Breather for Python?

    Python paterfamilias Guido van Rossum has proposed a multi-year moratorium on the scripting language: no more grammar or semantic changes.

  • pip3 Primer

    As a replacement for pip, pip3 offers a complete solution for binary packages. Here's how to get started with this increasingly popular Python installer.

  • ODROID-C2 vs. RPi3

    The inexpensive ODROID-C2 module runs two to three times faster than a Raspberry Pi 3.

  • RFID over SPI

    Inexpensive components for the SPI interface let you upgrade a Raspberry Pi 4 to a display system for zero-contact RFID-based data acquisition.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News