this post was submitted on 28 Oct 2023
107 points (95.7% liked)
Programmer Humor
32396 readers
507 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Quite a few unexpected results here...
The JS one is not surprising at all. There's no other loosely typed multi-paradigm scripting language where such insane shitloads of money and developer time have been spent for optimizing its execution (by some of the largest tech companies). Kinda funny considering that the language design is complete horse shit.
Your 2nd point is really quite surprising. I also wouldn't have thought that java would beat Go in both energy and time by that margin!
Without any information how this test result got achieved. It's kind of useless. It's like to read the headline of a paper. So sure you should question the accuracy of this image. But i would agree it's fun to look at it
But the paper is right there in the post
https://states.github.io/files/j2.pdf
Maybe i was blind, haven't seen it. Thx, I look into it because i'm curious, but it's long, so need first some time for it
Pascal is a simpler and more limited language, so it's not entirely surprising. It also has less and smaller standard libraries to link in.
As to C# and F#, what's wrong with the difference? The functional coding style of F# prefers immutable data over possibly mutable ones in C# and that requires more allocations and garbage collection.
I haven't looked into the details of the actual code, but I would expect the compiler optimizations and JIT to figure it all out and end up with very similar native code. Especially since both languages are mature and had enough time to reach such goals. But it's quite possible my assumptions are incorrect.