SITERAW

PHP Performance vs Other Scripting Languages

Author Message
Beast # Posted one month ago
Beast

Is PHP really that bad? In terms of performance vs other scripting languages, Python and Ruby, and in general? What about vs ASP.NET Core?

I'm asking because I see people often dumping on PHP, especially around here.

Thanks!

Ads
Dodorio # Posted three weeks ago
Dodorio

Who said PHP was slow?

Maul # Posted two weeks ago
Maul

You'd have to define 'scripting language'. Do you mean strictly interpreted languages like Python, or anything web dev related?

Depending on that the answer will vary. For instance, PHP is (usually) faster than Python, but will lose to something like ASP.NET Core.

Gandalf # Posted two weeks ago
Gandalf

PHP vs Perl: PHP basically is Perl, so performances are identical.

PHP vs Python: PHP is faster in execution for web applications, but Python is more liked because of readability, and ease of use. This isn't always 100% the case though, you'd have to benchmark.

PHP vs Ruby: Same as above, people like Ruby on Rails because it's more developer friendly. Few people gravitate towards it because of speed.

When comparing PHP to .NET languages, and particularly the web framework, ASP.NET Core will generally offer better performance due to its compiled nature (and its optimized runtime).

Phoenix # Posted one week ago
Phoenix

The "big four" scripting languages all offer similar performances in terms of execution and memory. I think that ironically it's Perl, the oldest - and nearly forgotten - language that offered the best execution performances. I can't remember the study, but it should be easy to reproduce and find similar results.

Heroes # Posted yesterday
Heroes

All of them would lose to ASP.NET CORE though. You can't defeat the power of compilation :)

Kalvin # Posted yesterday
Kalvin

All of them are horrible. The memory management is utter garbage.

Learn a real language or gtfo.

H2Fr Master # Posted yesterday
H2Fr Master

GTFO on the PHP forum?

Kalvin # Posted two hours ago
Kalvin

It's my forum now. We're purging the heretics and the noobs.

Dodorio # Posted two hours ago
Dodorio

If PHP is heresy, wtf is Javascript? Blasphemy?

Kalvin # Posted one hour ago
Kalvin

Do you really need to ask? What type of people does JS appeal to?

Celeri # Posted one hour ago
Celeri

Something that needs mentioning, something positive in favor of PHP (for once), is that it manages database queries rather well. Especially if used in conjunction with MySQLi. No idea why the course insists upon showing PDO down newbie throats.

Valter # Posted 7 minutes ago
Valter

No one going to mention Opcode caching? JIT? Async concurrency?

But I can't argue the premise, scripting languages will always lose to .NET. The same way you can't be more efficient than Assembly. The only way to do so would be to intentionally produce low quality, unoptimized ASM code. And even then, it would be a close call.

Post a reply

Please be kind and courteous in your replies. Don't roast others for no reason.