Hacker News
points by procaryote 2 days ago | 0 comments
The performance of python indicates otherwise. There are some performance critical libraries written in C or C++ but a lot of python is written in python.

Python in itself is poorly suited to ever become performant as it lacks the types required. I imagine that causes some issues for effective jit-ing too.

They had a chance to fix this when adding type annotations, but instead of making it "optional/gradual typing" they opted to make it "documentation or linting support", which is obviously the wrong choice, but there were cultural reasons

[–] mahboi 2 days ago
Does optional/gradual typing even help with JIT?
[–] procaryote 2 days ago
If you know the type you need fewer checks in the jitted code, and you can optimise to native types.

If it helps python specifically, given that the types themselves are pretty dynamic, who knows. A python integer doesn't map well to a native integer etc. Python really isn't designed for performance, and retrofitting it is hard.

[–] mahboi 1 day ago
Makes sense. And that's rough, even the integers need dynamic memory. Maybe they can just use 64-bit static ints and throw an exception (or even crash) if you go oob. Probably quite rare that anything would rely on huge ints.