What are some python micro optimisations that you can/may *actually use* in your codebase?

This page summarizes the projects mentioned and recommended in the original post on /r/Python

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • pyinstrument

    🚴 Call stack profiler for Python. Shows you why your code is slow!

  • I like to use pyinstrument for profiling. Uses stat sampling so it's quicker and builds a easy to grok report.

  • py-spy

    Sampling profiler for Python programs

  • CProfile is one, it comes built into the python standard library. https://docs.python.org/3/library/profile.html. py_spy and memray are another two you can check out. https://github.com/benfred/py-spy https://github.com/bloomberg/memray.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • memray

    Memray is a memory profiler for Python

  • CProfile is one, it comes built into the python standard library. https://docs.python.org/3/library/profile.html. py_spy and memray are another two you can check out. https://github.com/benfred/py-spy https://github.com/bloomberg/memray.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts