this post was submitted on 05 Jan 2024
16 points (100.0% liked)

Programming

17402 readers
110 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

The benchmark with 1B rows in this blogpost seems irrelevant for comparing performance of different programming languages.

It seems like the execution time of a program would be dominated by loading data from the file. And a lot of people posted solution with specs of cpu but not specs of disk (hdd, ssd, raid) although that seems more relevant.

Why would they compare languages and solutions in this way?

top 6 comments
sorted by: hot top controversial new old
[–] aubeynarf@lemmynsfw.com 13 points 10 months ago (1 children)

For most organizations, the cost of paying programmers far exceeds the cost of CPU time; benchmarks really should include how long the solution took to envision/implement and how many follow up commits were required to tune it.

[–] aluminium@lemmy.world 3 points 10 months ago* (last edited 10 months ago)

Also big "enterprise" Software usually becomes slow due to fundamental issues or issues in the architecture.

For example I worked on maintaining an old Java EE project and people there constantly made multiple sequencial HTTP requests despite the requests not being dependent on one another.

[–] killeronthecorner@lemmy.world 8 points 10 months ago (1 children)

To answer your question about environmental factors - from the repo:

Results are determined by running the program on a Hetzner Cloud CCX33 instance (8 dedicated vCPU, 32 GB RAM). The time program is used for measuring execution times, i.e. end-to-end times are measured.

[–] AlphaAutist@lemmy.world 2 points 10 months ago (1 children)

That seems to only be for the Java code

How fast though is Java versus other languages? A show and tell page has submissions in Rust, C#, Go, Python, PostgreSQL, Python, C, C++, and more. These are hard to compare with one another since they have been run on different hardware, but there are some impressive results, including one under 5 seconds done with C on an AMD laptop, and a C# solution that runs in 5.3 seconds on a Core i5-12500 with 6 cores.

[–] killeronthecorner@lemmy.world 1 points 10 months ago

The show and tell page is exactly that, show and tell; not a scientific or balanced comparison.

The original challenge only compared JDK solution in this way. Further down there is a link to another repo that does that same across many languages, and uses the same M1 MacBook Pro to run the tests.

[–] orhtej2@eviltoast.org 4 points 10 months ago

I would assume they want to factor in startup time as well as IO handling overhead - raw disk IO should be the same given programs are run in the same environment.