Hacker News new | ask | show | jobs
by devit 1092 days ago
Seems kind of pointless, since the implementations for different languages are independently written and thus the results depend mostly on the skill of the programmers who wrote them (at least for languages that are efficient), and on the quality of the specific standard library features being used if any.
4 comments

Not entirely pointless since this is open source and programmers of some caliber may be able to contribute better or more efficient code. All benchmarks should be taken with a huge grain of salt since this is rarely what these languages are used for by the majority. As well you shouldn’t be choosing a language solely based on speed and not on the individual application of the language. Memory usage though is something useful and impressive in these examples.
How do you know/measure what's efficient then?
Kind of shows how many rewrites of the rust code are needed to equalize or surpass the zig implementations which are much simpler to write
It's not a good idea to use this site (or the Computer Language Benchmarks Games https://benchmarksgame-team.pages.debian.net/benchmarksgame/ that it is partially based off) as an indicator of how may rewrites are necessary in order to generate good programs. The skill levels of the contributors and the size/popularity of the various programming language communities can vary a lot. The benchmark rules have been changing over time and contributors have been figuring out better algorithms over time so these both result in the contributed programs getting updated over time as well. Older programming languages have been around longer than newer programming languages and will have had more contributed programs consequently. Some programming languages are under more active development so require more revamps of existing programs. Etc...
That's the point isn't it. The skill level of the programmer is also dependent on how easy the language is to pick up
You could certainly make an argument that an easier language allows a programmer to reach a certain skill level faster or maybe even reach a higher peak skill level. By extension you could also argue that, by some definitions, the skill level of that language's community might be higher. However assuming you had equally skilled Rust and Zig programmers, I think it is wrong to say that the Rust programmers would require more rewrites to match or surpass the Zig programmers.
That isn't something the website was intended to show.

That isn't something the website does show.

It does show it with the number next to the language
Nope.

Language A programs can be implemented in language B without being "independently written".

1.zig may have been based on 9.rs.

Additionally, there are multiple reasons why one programming language might have nine different programs:

-The programs could have been written by someone who prefers to make small iterations and perform many submissions instead of someone who likes to make bigger changes with fewer submissions.

-The programs could be submitted by a novice who needs to make more submissions than would be required by a pro.

-The programming language may be older and has had more submissions.

-The programming language may be more actively changing and requires more updates in order to fix old programs.

-The programmers may also be making more submissions to improve other characteristics like memory usage, code size, code readability, compatibility, etc... that are unrelated to performance.

In short, previously the benchmarks game explicitly stated that the program numbers were arbitrary and signified nothing; and the same reasoning applies to hanabi1224's website.
The source code is there on the website.

Language A programs can be implemented in language B without being "independently written".