frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Data Processing Benchmark Featuring Rust, Go, Swift, Zig, Julia etc.

https://github.com/zupat/related_post_gen
71•behnamoh•8h ago

Comments

pron•4h ago
I was surprised to see that Java was slower than C++, but the Java code is run with `-XX:+UseSerialGC`, which is the slowest GC, meant to be used only on very small systems, and to optimise for memory footprint more than performance. Also, there's no heap size, which means it's hard to know what exactly is being measured. Java allows trading off CPU for RAM and vice-versa. It would be meaningful if an appropriate GC were used (Parallel, for this batch job) and with different heap sizes. If the rules say the program should take less than 8GB of RAM, then it's best to configure the heap to 8GB (or a little lower). Also, System.gc() shouldn't be invoked.

Don't know if that would make a difference, but that's how I'd run it, because in Java, the heap/GC configuration is an important part of the program and how it's actually executed.

Of course, the most recent JDK version should be used (I guess the most recent compiler version for all languages).

rockwotj•3h ago
It’s so hard to actually benchmark languages because it so much depends on the dataset, I am pretty sure with simdjson and some tricks I could write C++ (or Rust) that could top the leaderboard (see some of the techniques from the billion row challenge!).

tbh for silly benchmarks like this it will ultimately be hard to beat a language that compiles to machine code, due to jit warmup etc.

It’s hard to due benchmarks right, for example are you testing IO performance? are OS caches flushed between language runs? What kind of disk is used etc? Performance does not exist in a vacuum of just the language or algorithm.

pron•1h ago
> due to jit warmup

I think this harness actually uses JMH, which measures after warmup.

KerrAvon•2h ago
Why are you surprised? Java always suffers from abstraction penalty for running on a VM. You should be surprised (and skeptical) if Java ever beats C++ on any benchmark.
woooooo•1h ago
For the most naive code, if you're calling "new" multiple times per row, maybe Java benefits from out of band GC while C++ calls destructors and free() inline as things go out of scope?

Of course, if you're optimizing, you'll reuse buffers and objects in either language.

pron•1h ago
The only "abstraction penalty" of "running on a VM" (by which I think you mean using a JIT compiler), is the warmup time of waiting for the JIT.
Imustaskforhelp•4h ago
This is really interesting. Julia is a beast compared to python.

Nowadays whenever I see benchmarks of different languages. I really compare it to benjdd.com/languages or benjdd.com/languages2

Ended up creating a visualization of this data if anybody's interested

https://serjaimelannister.github.io/data-processing-benchmar...

(Given credits to both sources in the description of this repo)

(Also fair disclosure but it was generated just out of curiosity of how this benchmark data might look if it was on benjdd's ui and I used LLM's for this use case for prototyping purposes. The result looks pretty simiar imo for visualization so full credits to benjdd's awesome visualization, I just wanted this to be in that to see for myself but ended up having it open source/on github pages)

I think benjdd's on hackernews too so hi ben! Your websites really cool!

gus_massa•3h ago
Someone replied to me in an old comment that for fast Python you have to use numpy. In the folder there is a program in plain python, another with numpy and another with numba. I'm not sure why only one is shown in the data.

Disclaimer: I used numpy and numba, but my level is quite low. Almost as if I just type `import numpy as np` and hope the best.

another_twist•2h ago
> Almost as if I just type `import numpy as np` and hope the best.

As do we all. If you browse through deep learning code a large majority is tensor juggling.

Vaslo•4h ago
So in the D vs Zig vs Rust vs C fight - learn d if speed is your thing?
Ygg2•2h ago
That only applies in an apples-to-apples comparison, i.e., same data structures, same algorithm, etc. You can't compare sorting in C and Python, but use bubble sort in C and radix sort in Python.

In here there are different data structures being used.

> D[HO] and Julia [HO] footnote: Uses specialized datastructures meant for demonstration purposes: more ↩ ↩2

jhack•4h ago
D gets no respect. It's a solid language with a lot of great features and conveniences compared to C++ but it barely gets a passing mention (if that) when language discussions pop up. I'd argue a lot of the problems people have with C++ are addressed with D but they have no idea.
rsyring•2h ago
Could say the same for Nim.

But popularity/awareness/ecosystem matter.

Ygg2•2h ago
If the difference in performance between the target language and C++ is huge, it's probably not the language that's great, but some quirk of implementation.
ekianjo•3h ago
Data processing benchmark but somehow R is not even mentioned?
mcdermott•2h ago
It would be the slowest language result on the list.
ekianjo•29m ago
Slower than Python? I seriously doubt that
pyrolistical•3h ago
That’s odd zig concurrent got slower
another_twist•3h ago
Contention overhead likely. Performance is more than just the langauge.
pyrolistical•1h ago
Also 3 years old. Zig has been rewritten in that time
piskov•3h ago
C# is very fast (see multicore rating). Implementation based on simd (vector), memory spans, stackalloc, source generators and what have you — modern C# allows you go very low-level and very fast.

Probably even faster under .net 10.

Though using stopwatch for benchmark is killing me :-) Wonder if multiple runs via benchmarkdotnet would show better times (also due to jit optimizations). For example, Java code had more warm-up iterations before measuring

von_lohengramm•3h ago
This entire benchmark is frankly a joke. As other commenters have pointed out, the compiler flags make no sense, they use pretty egregious ways to measure performance, and ancient versions are being used across the board. Worst of all, the code quality in each sample is extremely variable and some are _really_ bad.
another_twist•3h ago
I mean this is only meant to be an iteration if I understand correctly. Its not like someone is going around citing this benchmark yelling rewrite everything in Julia / D. Imo this is a good starting point if you are doubtful or fall into the trap of Java is not fast. For most workloads we can clearly see, Java trades off the control of C++ for "about the same speed" and much much larger and well managed ecosystem. (Except for the other day, when someones OpenJDK PR was left hanging for a month which I am not sure why).
matthewfcarlson•2h ago
I see some questions around the methodology of the testing. But is this representative of Ruby? Several minutes total when most finish under a second?
aatd86•2h ago
Isn't that measuring the speed of json encoding instead?
KerrAvon•2h ago
Genuine question: Are GitHub workflows stable enough to be used for benchmarking? Like CPU time quantum scheduling is guaranteed to be the same from run to run?
jasonjmcghee•1h ago
What's up with the massive jump for 20k to 60k for nearly all languages?
foota•1h ago
My guess would be cache related. 5k probably fits in L1-L2 cache, whereas 20k might put you into L3.
XJ6w9dTdM•45m ago
I was very surprised to see the results for common lisp. As I scrolled down I just figured that the language was not included until I saw it down there. I would have guessed SBCL to be much faster. I checked it out locally and got: Rust 9ms, D: 16ms, and CL: 80ms.

Looking at the implementation, only adding type annotations, there was a ~10% improvement. Then the tag-map using vectors as values which is more appropriate than lists (imo) gave a 40% improvement over the initial version. By additionally cutting a few allocations, the total time is halved. I'm guessing other languages will have similar easy improvements.

sergiotapia•40m ago
I wrote a script (now an app basically haha) to migrate data from EMR #1 to EMR #2 and I chose Nim because it feels like Python but it's fast as hell. Claude Code did a fine job understanding and writing Nim especially when I gave it more explicit instructions in the system prompt.

Mobile carriers can get your GPS location

https://an.dywa.ng/carrier-gnss.html
517•cbeuw•11h ago•329 comments

List animals until failure

https://rose.systems/animalist/
33•l1n•3h ago•13 comments

Cells use 'bioelectricity' to coordinate and make group decisions

https://www.quantamagazine.org/cells-use-bioelectricity-to-coordinate-and-make-group-decisions-20...
12•marojejian•4h ago•1 comments

In praise of –dry-run

https://henrikwarne.com/2026/01/31/in-praise-of-dry-run/
91•ingve•8h ago•60 comments

Generative AI and Wikipedia editing: What we learned in 2025

https://wikiedu.org/blog/2026/01/29/generative-ai-and-wikipedia-editing-what-we-learned-in-2025/
102•ColinWright•7h ago•48 comments

pg_tracing: Distributed Tracing for PostgreSQL

https://github.com/DataDog/pg_tracing
7•tanelpoder•3d ago•1 comments

Opentrees.org (2024)

https://opentrees.org/#pos=1/-37.8/145
32•surprisetalk•4d ago•3 comments

Scientist who helped eradicate smallpox dies at age 89

https://www.scientificamerican.com/article/smallpox-eradication-champion-william-foege-dies-at-89/
162•CrossVR•3d ago•33 comments

Outsourcing thinking

https://erikjohannes.no/posts/20260130-outsourcing-thinking/index.html
100•todsacerdoti•7h ago•86 comments

Best of Moltbook

https://www.astralcodexten.com/p/best-of-moltbook
25•feross•7h ago•4 comments

The Saddest Moment (2013) [pdf]

https://www.usenix.org/system/files/login-logout_1305_mickens.pdf
99•tosh•8h ago•19 comments

Data Processing Benchmark Featuring Rust, Go, Swift, Zig, Julia etc.

https://github.com/zupat/related_post_gen
71•behnamoh•8h ago•30 comments

Demystifying ARM SME to Optimize General Matrix Multiplications

https://arxiv.org/abs/2512.21473
65•matt_d•8h ago•14 comments

Apple-1 Computer Prototype Board #0 sold for $2.75M

https://www.rrauction.com/auctions/lot-detail/350902407346003-apple-1-computer-prototype-board-0-...
35•qingcharles•2h ago•16 comments

Nintendo DS code editor and scriptable game engine

https://crl.io/ds-game-engine/
115•Antibabelic•10h ago•28 comments

Finland looks to introduce Australia-style ban on social media

https://yle.fi/a/74-20207494
538•Teever•11h ago•394 comments

Show HN: Minimal – Open-Source Community driven Hardened Container Images

https://github.com/rtvkiz/minimal
75•ritvikarya98•8h ago•24 comments

Wikipedia: Sandbox

https://en.wikipedia.org/wiki/Wikipedia:Sandbox
64•zaptrem•1d ago•16 comments

Swift is a more convenient Rust (2023)

https://nmn.sh/blog/2023-10-02-swift-is-the-more-convenient-rust
251•behnamoh•6h ago•232 comments

Ferrari vs. Markets

https://ferrari-imports.enigmatechnologies.dev/
48•merinid•2d ago•26 comments

CollectWise (YC F24) Is Hiring

https://www.ycombinator.com/companies/collectwise/jobs/ZunnO6k-ai-agent-engineer
1•OBrien_1107•7h ago

Nvidia's 10-year effort to make the Shield TV the most updated Android device

https://arstechnica.com/gadgets/2026/01/inside-nvidias-10-year-effort-to-make-the-shield-tv-the-m...
115•qmr•13h ago•98 comments

CPython Internals Explained

https://github.com/zpoint/CPython-Internals
180•yufiz•4d ago•43 comments

EV-1 for Lease (1996)

https://www.loe.org/shows/shows.html?programID=96-P13-00047#feature4
6•1970-01-01•2d ago•1 comments

Apple Platform Security (Jan 2026) [pdf]

https://help.apple.com/pdf/security/en_US/apple-platform-security-guide.pdf
145•pieterr•12h ago•108 comments

Writing a .NET Garbage Collector in C# – Part 6: Mark and Sweep

https://minidump.net/writing-a-net-gc-in-c-part-6/
53•pjmlp•4d ago•1 comments

Show HN: Moltbook – A social network for moltbots (clawdbots) to hang out

https://www.moltbook.com/
161•schlichtm•3d ago•812 comments

Noctia: A sleek and minimal desktop shell thoughtfully crafted for Wayland

https://github.com/noctalia-dev/noctalia-shell
48•doener•8h ago•19 comments

When will CSS Grid Lanes arrive?

https://webkit.org/blog/17758/when-will-css-grid-lanes-arrive-how-long-until-we-can-use-it/
7•feross•5h ago•0 comments

Sparse File LRU Cache

http://ternarysearch.blogspot.com/2026/01/sparse-file-lru-cache.html
4•paladin314159•3h ago•0 comments