this post was submitted on 10 Jul 2025
73 points (100.0% liked)

Python

7282 readers
50 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 9 points 22 hours ago (13 children)

python is a language explicitly designed to resist any form of proper optimization. It just can't be made fast

[–] [email protected] 6 points 21 hours ago (11 children)

it doubled in speed from 3.9 to now, so it's getting there.

[–] [email protected] 2 points 20 hours ago (10 children)

That ignores just how slow it is. It's on the order of 100x slower than "fast" languages like Rust and Go, so doubling in speed... while nice for Python Devs doesn't really make it fast on an absolute scale. They need to double it's speed a few more times at least.

[–] [email protected] 2 points 20 hours ago (1 children)

go is also not a fast language. it's about halfway between python and c.

but they all solve different problems so that's ok.

[–] [email protected] 3 points 19 hours ago (1 children)

Absolute rubbish. Go is typically something like 2-3x slower than "native" languages like C and Rust. Python is typically 50-100x times slower. Go is much much closed to C than it is to Python.

[–] [email protected] 1 points 18 hours ago* (last edited 18 hours ago) (1 children)

not exactly: https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html tl;dr it can be true, but not necessarily. fast python code is on the magnitude of 1/5th the speed of go.

the thing with python is that there is a huge difference between fast and slow code. in go, only really slow code is slow, and in rust even slow code is fast.

[–] [email protected] 1 points 18 hours ago (1 children)

You shouldn't blindly trust those numbers. If you actually read the Python code a lot of them use ctypes to just delegate the work to C. It even says that at the bottom of the page.

Seems like they've finally started calling these out - search for "contentious" on this page:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-go.html

[–] [email protected] 4 points 17 hours ago (2 children)

i mean, that's what you're supposed to do. python is a glue language, after all.

[–] [email protected] 2 points 14 hours ago (1 children)

Nonsense. You are only "supposed" to do that because if you are using Python and you want performance you have no other choice!

Reminds me of people saying you aren't "supposed" to store binaries in git - yeah only because git is so bad at it! When we were all using SVN people would have said "you aren't supposed to have multiple people editing the same file simultaneously" as if it were a fundamental truth.

And Python isn't "a glue language". It's often used like that but there are many many pure Python projects.

[–] [email protected] 4 points 13 hours ago (1 children)

but like, most of the standard library is written in c. most popular libraries are written in c. they're built that way because python is a flexible way to glue functionality together. that's the point of python: it's easy. if i want performance, i port part of the logic to a compiled language. but most of the time that's not necessary.

just like how with git, we have lfs. we build what we need when we need it. i don't understand your tone here.

[–] [email protected] 1 points 9 hours ago* (last edited 9 hours ago) (1 children)

they’re built that way because python is a flexible way to glue functionality together

Lol no. They're built that way because it's fast! Can you imagine how slow Python would be if it was self hosted? Actually I bet someone has tried that...

Yep - go and benchmark that and get back to me in a few days when it's finished running hello world, lol.

just like how with git, we have lfs

Have you ever actually used LFS? It's a pretty terrible experience.

[–] [email protected] 2 points 7 hours ago

why are you so combative?

[–] [email protected] 1 points 14 hours ago

Nonsense. You are only "supposed" to do that because if you are using Python and you want performance you have no other choice!

Reminds me of people saying you aren't "supposed" to store binaries in git - yeah only because git is so bad at it! When we were all using SVN people would have said "you aren't supposed to have multiple people editing the same file simultaneously" as if it were a fundamental truth.

And Python isn't "a glue language". It's often used like that but there are many many pure Python projects.

load more comments (8 replies)
load more comments (8 replies)
load more comments (9 replies)