Live data from Hacker News

Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

benchmarksgame.alioth.debian.org

71–80 of 132 posts

Re: Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

#71
With this new revision this great benchmark got less useful.

Why can't I compare:

  Lua vs LuaGIT

  PHP5 vs PHP7 vs HHVM vs Hack

  Perl5 vs Perl6

  GNU GCC vs Intel C vs CLANG
This new rule "one implementation per language" is so stupid!!!

@debian: change it back

Re: Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

#72
post #8

So PHP is faster on most of those test than python or ruby ? I'm I missing something ? I thought everyone hating PHP ( also) because it was slow.

Speed is not the problem. Amongst many other issues, php has a terrible security track record compared to other languages VMs/compilers.

Re: Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

#74
post #8

So PHP is faster on most of those test than python or ruby ? I'm I missing something ? I thought everyone hating PHP ( also) because it was slow.

Nobody that I'm aware of has ever hated PHP because it was slow. They hated it for a variety of other reasons.

Just like JavaScript, PHP used to be slow. Then, large amounts of effort and/or money were spent into making them not so.

Re: Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

#75
post #8

So PHP is faster on most of those test than python or ruby ? I'm I missing something ? I thought everyone hating PHP ( also) because it was slow.

No, PHP is actually really fast. Especially HHVM[1] which is crazy fast. [1] - http://hhvm.com

Today.

Re: Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

#76
post #65
post #8

So PHP is faster on most of those test than python or ruby ? I'm I missing something ? I thought everyone hating PHP ( also) because it was slow.

No PHP is hated because it's too easy to use. The means that a lot of rather bad (inexperienced?) programmers use it, which means there is a lot of bad PHP code out there. People see that bad code and assume the language is bad. The language has some warts and inconsistencies, and people are eager to point them out as justification for their hate. But for real programming most of them hardly matter.

this is something a bit naive - basically all dynamic languages have the same low barrier and can produce the same crappy code, see for example javascript or ruby (with RoR). Python too, considering the fact that it's used by a lot of people that their main job is not software engineering.

The biggest difference between PHP and the other dynamic languages, though, is that PHP came out with pretty popular stuff like wordpress, joomla, magento or drupal that they all share crappy code coz they all have a large codebase started before PHP managed to fix some stuff starting from version 5.3

Re: Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

#77
post #65

Earlier quoted context omitted.

No PHP is hated because it's too easy to use. The means that a lot of rather bad (inexperienced?) programmers use it, which means there is a lot of bad PHP code out there. People see that bad code and assume the language is bad. The language has some warts and inconsistencies, and people are eager to point them out as justification for their hate. But for real programming most of them hardly matter.

this is something a bit naive - basically all dynamic languages have the same low barrier and can produce the same crappy code, see for example javascript or ruby (with RoR). Python too, considering the fact that it's used by a lot of people that their main job is not software engineering. The biggest difference between PHP and the other dynamic languages, though, is that PHP came out with pretty popular stuff like w…

Python is as easy to write as PHP, but deploying it as a web app is a whole different story.

Re: Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

#78
post #61
post #58

Earlier quoted context omitted.

php7 was threatened by hhvm and was completely rewritten by keeping backcompat. It's now the fastest major old scripting language. js and luajit are in the very fast ballpark, php in the middle and the other 3 far behind. PHP also has the best language features and IDE integrations, the only remaining problem is the legacy stdlib and devbase. Ruby with an inliner and method cache would catch up, but I don't see it ha…

Pypy is considerably faster than CPython, so I don't think Python is doomed to be slower?

pypy changed not only the vm, but also the internal data structures. It's totally different. pypy's problem is that is only optimizes loops and often called functions, not the general interpretation, as e.g. PHP7 or lua did. For normal, simple small scripts it's not that big a benefit, and you loose all the extensions, (though that's being worked on).

Re: Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

#79

Years ago i was naive enough to believe these benchmarks. Now i know these are Potemkin-village level stunts and political maneuvering by language activists and staff of that site. If you really want actual benchmarking you have to do it yourself and read the .asm output for comparison. Another caveat is that some languages are genuinely faster in one hyperoptimized case(even faster than C) but fail horribly when thi…

You provided zero evidence for your claim. I'm not saying you're necessarily wrong, but so far you have only made an assertion.

If you think some language is misrepresented in that benchmark, you can submit your own solution.

Re: Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby, Perl, Go, Lua, Rust

#80

Years ago i was naive enough to believe these benchmarks. Now i know these are Potemkin-village level stunts and political maneuvering by language activists and staff of that site. If you really want actual benchmarking you have to do it yourself and read the .asm output for comparison. Another caveat is that some languages are genuinely faster in one hyperoptimized case(even faster than C) but fail horribly when thi…

You provided zero evidence for your claim. I'm not saying you're necessarily wrong, but so far you have only made an assertion. If you think some language is misrepresented in that benchmark, you can submit your own solution.

On how the benchmarks should be interpreted http://benchmarksgame.alioth.debian.org/for-programming-lang...
Post reply on HN