Hacker News new | ask | show | jobs
by TekMol 1897 days ago
TLDR: Because Python is slow

Yes, that is the achilles heel of Python.

I am always torn between Python and PHP for new projects because of this.

The Python Syntax plus its import system are huge advantages over PHP. On the other hand, you suffer a 6x slowdown if you go with Python. Decisions decisions. I so dearly wish I could have the good parts of both worlds.

2 comments

Python is indeed slow, but why would anyone ever use php as a comparison point?

And for data processing of all things ...

Php is also very slow, on top of being many other kinds of unpleasant and broken.

I had a nightmare where I was writing an operating system in PHP, which ran in hypervisor written in PHP, which ran in a virtual machine written in PHP, which in a browser written in PHP, which ran in an operating system written in PHP...
PHP has a proper JIT compiler on its reference implementation.
> PHP has a proper JIT compiler on its reference implementation.

That doesn't make it fast at all. Just faster than if it wasn't jitted.

And that certainly does not eradicate the vast ocean of other problems php has, the first of which being that is was never, ever "though out" and instead grew like a cancerous mushroom.

> that is the achilles heel of Python

I think that is pip.