←back to thread

122 points phsilva | 2 comments | | HN request time: 0.41s | source
Show context
VWWHFSfQ ◴[] No.43111138[source]
Will Python ever get fast? Or even _reasonably_ fast?

The answer is no, it will not. Instead they'll just keep adding more and more syntax. And more and more ways to do the same old things. And they'll say that if you want "fast" then write a native module that we can import and use.

So then what's the point? Is Python really just a glue language like all the rest?

replies(4): >>43111179 #>>43111277 #>>43111282 #>>43111343 #
1. mattbillenstein ◴[] No.43111282[source]
The JIT will improve - you can also use PyPy to get speedups on programs that don't use a ton of C extensions.

Also, free-threading is coming so we'll have threads soon.

I don't know if Python can every really be fast as by design, objects are scattered all over memoryand even things like iterating a list, you're chasing pointers to PyObject all over the place - it's just not cache friendly.

replies(1): >>43113077 #
2. olau ◴[] No.43113077[source]
PyPy has a list implementation that specializes under the hood. So if you stuff it with integers, it will contain the integers directly instead of pointers to them. That's at least how I understood it.