Live data from Hacker News

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

benchmarksgame.alioth.debian.org

91–100 of 132 posts

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

#91
post #87
post #9

Hey, the benchmark game got a new website (at some point in the several years since I looked at it last)! Almost simplistic, but nice to read. As someone that works predominantly in a language long considered passé (Perl), I always kinda relish seeing that it is still faster than Python and Ruby for many problems. As Python and Ruby have gotten faster, I'd sort of assumed they were both notably and clearly faster tha…

>> new website Dec 2015. Pleased you find it nice to read.

Are you the maintainer? Thanks for keeping it running all these years, if so.

I don't go there often, but it's nice to know there's a way to get a vague understanding of relative performance for languages for those occasions when one needs to know "is it fast enough?"

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

#92
post #73

where's D-lang? it would be interesting to compare D with C, C++, and Rust

Good luck on seeing D on that site. There seems to be a active war between the sites maintainer and D. There used to be D benchmarks on the old site and people tries to release new code to the site, but for some reason the current maintainer has a issue with D.

And he thinks its no unfair that D is not resented when a lot of people look at his site and think: "If your not here as a language, then the language must be bad".

Good luck on changing his mindset because i have seen topics going back years regarding D not being there.

If you want a more impartial benchmark set:

https://github.com/kostya/benchmarks

And where is D on those tests ;)

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

#93
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.

Any comments that "startup time is a concern with the JVM" always make me look for evidence that the person has made some attempt to investigate startup time for the specific circumstances they discuss.

http://benchmarksgame.alioth.debian.org/sometimes-people-jus...

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

#94
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…

Perhaps this is merely a reflection of the difficulty of finding where to download the measurement scripts? I found them (here: http://benchmarksgame.alioth.debian.org/play.html ) but, it took some clicking. Maybe a github link on the front page, or similar, would alleviate some of the frustration the previous poster had about it.

I assumed the sources were available, somewhere, but until I went looking for it, I wouldn't have been able to say so with confidence. That's not an obligation, of course...volunteers should feel free to do whatever they want with their projects. But, if you wanted to keep the community involvement the game had historically, linking source in the lingua franca of the day (github or gitlab, or whatever, seems pretty standard today) would go a long way.

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

#95
post #87

Earlier quoted context omitted.

>> new website Dec 2015. Pleased you find it nice to read.

Are you the maintainer? Thanks for keeping it running all these years, if so. I don't go there often, but it's nice to know there's a way to get a vague understanding of relative performance for languages for those occasions when one needs to know "is it fast enough?"

>> Thanks for keeping it running all these years Thanks to all those who contribute their expertise and their programs.

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

#96
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…

Perhaps this is merely a reflection of the difficulty of finding where to download the measurement scripts? I found them (here: http://benchmarksgame.alioth.debian.org/play.html ) but, it took some clicking. Maybe a github link on the front page, or similar, would alleviate some of the frustration the previous poster had about it. I assumed the sources were available, somewhere, but until I went looking for it, I wou…

Perhaps, so I just googled "download benchmarks game scripts" -- 4th URL on first page of results.

Perhaps it's merely a reflection of wanting some one else to do work we choose not to do.

(You'll find that there already are duplicates of the benchmarks game repos on github).

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

#97

I see that the point of this site is supposed to be that a change in implementation (keeping the language itself held constant) greater affect on performance than rewriting in another language. My problem with this site it makes poor support of that claim. The data is hidden behind loads of links, and none of the data is visualized at all. Even a few simple bar charts, keeping the hierarchy of the site otherwise unch…

What on the website tells you that is the point?

>> Even a few simple bar charts http://benchmarksgame.alioth.debian.org/u64q/which-programs-...

>> would vastly aid comprehension. Is it possible that you are just wrong?

Is it possible that simple bar charts do not aid comprehension but encourage thoughtless instant conclusions?

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

#98

The Go vs JavaScript lineup is quite stunning. Go destroys Node.js in memory usage and performance on every test except regex-redux (edge case?). http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

>regex-redux (edge case?) It looks like the JS version is using the built in runtime's regex engine. I don't know exactly why (maybe differences or missing features in go's regex) but the go version is actually using the c FFI to call pcre.h, and without profiling it I'd guess a huge hit is that alone.

> I don't know exactly why … and without profiling it I'd guess a huge hit is that alone.

Don't guess. Look at the measurements. Look at the source code. That Go PCRE program is faster than --

http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

Maybe faster still to use some of the techniques from this other Go PCRE program --

http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

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

#99
post #96

Earlier quoted context omitted.

Perhaps this is merely a reflection of the difficulty of finding where to download the measurement scripts? I found them (here: http://benchmarksgame.alioth.debian.org/play.html ) but, it took some clicking. Maybe a github link on the front page, or similar, would alleviate some of the frustration the previous poster had about it. I assumed the sources were available, somewhere, but until I went looking for it, I wou…

Perhaps, so I just googled "download benchmarks game scripts" -- 4th URL on first page of results. Perhaps it's merely a reflection of wanting some one else to do work we choose not to do. (You'll find that there already are duplicates of the benchmarks game repos on github).

"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.

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

#100

Earlier quoted context omitted.

A program written in C will execute faster if you run it multiple times, and slower if it has not been run recently. Presumably all of the benchmarks consist of many thousands of repetitions of the same process.

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.
Post reply on HN