Skip to content

Faster Python, beyond semantic interposition #575

Open
@itamarst

Description

@itamarst

#501 has a useful suggestion for speeding up Python by ~20%. After that's done, it's actually possible to do better.

Host is Fedora 33. All tests were run with Python 3.9.

On host:

  • Fedora's Python gives 200K pystone/sec.
  • Conda-Forge Python gives 240K pystone/sec.

Running inside Docker 20.04 (cgroups v2 enabled):

  • fedora:33 gives 173K pystone/sec.
  • python:3.9-slim-buster, I get 169K pystone/sec.
  • ubuntu:20.04 (no shared library): 183K pystone/sec.
  • continuumio/miniconda3 with Python from Conda-Forge: 189K/sec

I am mystified why things are so much slower inside Docker. Some of this is clearly not because of the image, but the runtime. But notice the Ubuntu image is definitely faster.

With podman:

  • python:3.9-slim-buster: 204K/sec
  • continuumio/miniconda3 with Python from Conda-Forge: 230K/sec

Note that the Anaconda (default Conda) Python 3.9 does not appear faster, it's specifically whatever Conda-Forge does. I am trying to figure that out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions