Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python needs to be compiled into machine language to ever have a chance of competing on speed. We can already get around the GIL with multiprocess but Python is still to slow even when not bound by copying memory between processes.


The phrase "competing on speed" begs the question "competing...with what?" If the answer is "machine compiled languages", then yes, it's unlikely Python will ever match their speed without also being compiled to machine code, but there are plenty of other interpreted languages with better performance than Python (even ruling out stuff like Java that technically isn't "compiled into machine language" in the way that phrase usually would mean); lots of work is done on JavaScript interpreters to improve performance, and I don't think that specifically has cost the language much flexibility.


I use python. I don’t love it but it has a good selection of libraries for what I do. It’s not blazing fast but not terribly slow either.

As for multiprocess, I currently have 150 python process running on the work cluster. Each doing their bit of a large task. The heavy lifting is in a python library but it’s C code. but it’s actually not bad performance wise and frankly wasn’t to bad to code up. I think for my use case threads would make it harder.

Maybe Im liking python more over time..


Java is technically compiled into machine language, it is a matter to chose the JDK that offers such options, many people don't, but that is their problem, not lack of options.

JavaScript interpreters that people actually use, have a JIT inbox.


> other interpreted languages

Both Java and Javascript are ultimately compiled into machine code, through JIT. And this matters because Python doesn't have JIT.

Even Ruby, that is historically a way slower language, is gaining JIT nowadays. Python has got no excuses.


I don't think the goal is to "compete on speed", but I'm sure people wouldn't complain about their Python scripts running 15x faster on their 16 core CPU.

And it is also about flexibility. What I love about Python is the simplicity, and let's be honest, multiprocess anything but. Especially if you fall into one of the gotchas (unpickable data for example).


Multiprocess is quite easy, have you tried aio_multiprocess?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: