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

  • 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.

  • Python’s Tkinter Library

    Use Tkinter to control your Rasp Pi projects from a smartphone or tablet.

  • Go on the Rasp Pi

    We show you how to create a Go web app that controls Raspberry Pi I/O.

  • Data Visualization in Python

    Python's powerful Matplotlib, Bokeh, PyQtGraph, and Pandas libraries lend programmers a helping hand when visualizing complex data and their relationships.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News