Live data from Hacker News

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

benchmarksgame.alioth.debian.org

121–130 of 132 posts

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

#121
post #89
post #56

Earlier quoted context omitted.

Perl is only faster here in nbody because I tricked it. I used a tricky compile-time optimization for faster array index access. You wouldn't do that in the real world, and in the real world PHP, ruby and python are faster. cperl instead is only beaten by PHP. But the benchmark game is not open for faster alternate engines like luajit, nim, crystal, pypy, truffle-graal, ... or even slower ones like Perl6, which limit…

>> a tricky compile-time optimization for faster array index access. And you even comment on that usage in your code. >> Decades ago it was open and written in Perl. Then it was rewritten in Python and closed down. Go figure. At best your comment is disingenuous. You can download the Python measurement scripts, use them with luajit, nim, crystal, pypy, truffle-graal or Perl6 programs and publish the measurements. You…

If course I have the benchmarks, because that's how everybody benchmarks it. But rather with the old perl scripts, not with your new python scripts. They suck. Before it was trivial to bench, but not trivial to setup all the environments.

The problem is not that someone else can do it, the problem is YOU need to do it. You got the name reserved for it, you got the machines to do it, you decide to rewrite it and throw them out, no one is looking somewhere else for better and more benchmarks.

The big competitors with better and faster engines have no incentive to match performance when their name is not on the list, and they just publish their own results. Users don't look somewhere else.

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

#122
post #121
post #89

Earlier quoted context omitted.

>> a tricky compile-time optimization for faster array index access. And you even comment on that usage in your code. >> Decades ago it was open and written in Perl. Then it was rewritten in Python and closed down. Go figure. At best your comment is disingenuous. You can download the Python measurement scripts, use them with luajit, nim, crystal, pypy, truffle-graal or Perl6 programs and publish the measurements. You…

If course I have the benchmarks, because that's how everybody benchmarks it. But rather with the old perl scripts, not with your new python scripts. They suck. Before it was trivial to bench, but not trivial to setup all the environments. The problem is not that someone else can do it, the problem is YOU need to do it. You got the name reserved for it, you got the machines to do it, you decide to rewrite it and throw…

Dude. What's up with attacking someone who does things voluntarily (I presume) for not doing them the way you want them to? That's pretty damned presumptuous.

Open Source stuff really only ever has one guarantee: If it breaks, you get to keep the pieces.

You can put it back together any way you want, but you can't demand they give you a new one that meets your expectations. Unless you want to pay them to do so, and they're willing to accept the money and terms.

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

#123
post #108

Earlier quoted context omitted.

"Perhaps it's merely a reflection of wanting some one else to do work we choose not to do." Entirely valid position to take. There's only so many hours in a day, so many days in a year, and so many years in a life.

rurban (and frik and wulfklaue ) do not seem to feel that it is a valid position for me to take.

Yeah, they're wrong. Offering polite suggestions is one thing, demanding volunteers do things in some specific way is entirely another.

Do it the way you want to do it. Unless someone is paying you or you want their specific help with something going forward, I don't see any obligation on your part to listen to demands.

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

#124
post #121
post #89

Earlier quoted context omitted.

>> a tricky compile-time optimization for faster array index access. And you even comment on that usage in your code. >> Decades ago it was open and written in Perl. Then it was rewritten in Python and closed down. Go figure. At best your comment is disingenuous. You can download the Python measurement scripts, use them with luajit, nim, crystal, pypy, truffle-graal or Perl6 programs and publish the measurements. You…

If course I have the benchmarks, because that's how everybody benchmarks it. But rather with the old perl scripts, not with your new python scripts. They suck. Before it was trivial to bench, but not trivial to setup all the environments. The problem is not that someone else can do it, the problem is YOU need to do it. You got the name reserved for it, you got the machines to do it, you decide to rewrite it and throw…

>> Before it was trivial to bench, but not trivial to setup all the environments. That's what it's like now -- trivial but time consuming.

There were pain-points with the old perl scripts (and nested make files) but I would have continued to put-up with the problems and would have continued to use the old perl scripts.

But (back in 2008) I couldn't see how to set-affinity with Perl and I could see how to do that with Python.

That's why I rewrote the measurement scripts in Python.

>> They suck. https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writ...

>> You got the name reserved for it Wow! Think-up a name!

>> you got the machines to do it I have one too-old machine.

>> no one is looking somewhere else for better and more benchmarks 55% of page views are from "organic search".

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

#125
post #81

Earlier quoted context omitted.

That comparison is complicated: it's definitely easy to drop a .php file on a server but once you start talking about frameworks, using a newer version than your OS distribution shipped, adding C extensions, etc. it's easy to find counter-examples, and the Go proponents are not wrong to observe that deploying a single file is easier than either. This is also becoming less of a distinguishing factor in the container e…

At least PHP offers that option at all, and it's well-supported and well-documented. It's also very easy. Good luck doing the same with any other language. If you really, really try it's possible in Python, C# and Java too, but ... wtf.

Note that I didn't say it wasn't a selling point for PHP. It's just that I can count on no fingers large PHP projects I've seen where deployment is still that simple – and that's generally not a problem because with modern tooling (e.g. Ansible) and deployment options (e.g. containers) you're under less pressure to make that a deciding factor for your application.

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

#126
post #57
post #14

Any benchmark that includes a JVM language always makes me look for a disclaimer that they allowed for proper JIT/warming time by running the benchmark a few times in the same VM instance before collecting the numbers. I may have missed it in this article, but I didn't see it. Yes, startup time is a concern with the JVM, but that's not what it's built for - it's meant for long-runnning repeatable code paths.

He doesn't do warmups for JITted languages.

...which means the measurements are meaningless. They will include the time to analyse the hot paths and then compile them.

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

#127
post #100

Earlier quoted context omitted.

The difference is not as dramatic as with the JVM.

The difference is not as dramatic with tiny tiny programs that run for more than a few tenths of a second.

Oh, yes it is. I've benchmarked code I've written in C++ vs Java before and allowing hotspot to optimise the code makes a huge difference

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

#128
post #100

Earlier quoted context omitted.

The difference is not as dramatic with tiny tiny programs that run for more than a few tenths of a second.

Oh, yes it is. I've benchmarked code I've written in C++ vs Java before and allowing hotspot to optimise the code makes a huge difference

[deleted]

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

#129
post #57

Earlier quoted context omitted.

He doesn't do warmups for JITted languages.

...which means the measurements are meaningless. They will include the time to analyse the hot paths and then compile them.

They will include a few tenths of a second.

Note the timings are seconds and tens-of-seconds.

Post reply on HN