Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python performance vs PHP [closed]

Tags:

python

php

I am an experienced PHP developer, and I would want to know what of both languages is better for web development.

I understand that there are a lot of factors to evaluate; but focusing in execution time, in your own experience making connections to a MySQL server, parsing and concatenating strings, and making several echoes (or prints), what language would you recommend me?

I cite this specific situations because are common for me, and I don´t calculate fibonacci sequences neither prime numbers, like are showed in several benchmarks.

like image 460
Luis Arriojas Avatar asked Sep 23 '11 04:09

Luis Arriojas


1 Answers

Even if things aren't specifically integer comparison or string comparison problems, looking at those computations is a decent indication of how the language will perform in more complex tasks. Keep in mind, though, that web development isn't all about computation speed. Unless you're doing some fancy backend data processing (in which case PHP is really not appropriate) when it comes to things like generating pages: it's still often worth the small sacrifice in terms of speed/memory to make it much, much easier to develop.

Also: Python+MySql is kind of a pain, in my experience. It can be done. But it's not nearly as nice.

Which is faster, python webpages or php webpages? <- lots of stuff here

like image 156
Turnsole Avatar answered Oct 03 '22 20:10

Turnsole