frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

JavaScript's New Superpower: Explicit Resource Management

https://v8.dev/features/explicit-resource-management
70•olalonde•4h ago•33 comments

A Critical Look at "A Critical Look at MCP."

https://docs.mcp.run/blog/2025/05/16/mcp-implenda-est/
27•palmfacehn•1h ago•5 comments

Getting AI to write good SQL

https://cloud.google.com/blog/products/databases/techniques-for-improving-text-to-sql
345•richards•12h ago•175 comments

Wow@Home – Network of Amateur Radio Telescopes

https://phl.upr.edu/wow/outreach
119•visviva•8h ago•6 comments

XTool – Cross-platform Xcode replacement

https://github.com/xtool-org/xtool
104•TheWiggles•7h ago•30 comments

A Linux kernel developer plays with Home Assistant: general impressions

https://lwn.net/SubscriberLink/1017720/7155ecb9602e9ef2/
92•pabs3•7h ago•31 comments

Catalog of Novel Operating Systems

https://github.com/prathyvsh/os-catalog
17•prathyvsh•2h ago•1 comments

Thoughts on thinking

https://dcurt.is/thinking
446•bradgessler•14h ago•294 comments

A Research Preview of Codex

https://openai.com/index/introducing-codex/
430•meetpateltech•19h ago•365 comments

New high-quality hash measures 71GB/s on M4

https://github.com/Nicoshev/rapidhash
64•nicoshev11•3d ago•23 comments

Show HN: Fahmatrix – A Lightweight, Pandas-Like DataFrame Library for Java

https://github.com/moustafa-nasr/fahmatrix
26•mousomashakel•5h ago•5 comments

MIT asks arXiv to withdraw preprint of paper on AI and scientific discovery

https://economics.mit.edu/news/assuring-accurate-research-record
308•carabiner•18h ago•156 comments

Rustls Server-Side Performance

https://www.memorysafety.org/blog/rustls-server-perf/
109•jaas•3d ago•27 comments

MCP: An in-depth introduction

https://www.speakeasy.com/mcp/mcp-tutorial
79•ritzaco•3d ago•27 comments

Popcorn: Run Elixir in WASM

https://popcorn.swmansion.com/
15•clessg•1d ago•0 comments

Show HN: Merliot – plugging physical devices into LLMs

https://github.com/merliot/hub
45•sfeldma•8h ago•11 comments

I'm Peter Roberts, immigration attorney, who does work for YC and startups. AMA

216•proberts•19h ago•374 comments

Hunting extreme microbes that redefine the limits of life

https://www.nature.com/articles/d41586-025-01464-7
17•gnabgib•2d ago•1 comments

Coding agent in 94 lines of Ruby

https://radanskoric.com/articles/coding-agent-in-ruby
107•radanskoric•2d ago•53 comments

Show HN: KVSplit – Run 2-3x longer contexts on Apple Silicon

https://github.com/dipampaul17/KVSplit
246•dipampaul17•14h ago•36 comments

ClojureScript 1.12.42

https://clojurescript.org/news/2025-05-16-release
158•Borkdude•13h ago•29 comments

Show HN: Visual flow-based programming for Erlang, inspired by Node-RED

https://github.com/gorenje/erlang-red
223•Towaway69•19h ago•93 comments

X X^t can be faster

https://arxiv.org/abs/2505.09814
176•robinhouston•18h ago•52 comments

Implementing a RISC-V Hypervisor

https://seiya.me/blog/riscv-hypervisor
3•ingve•2h ago•0 comments

Fixrleak: Fixing Java Resource Leaks with GenAI

https://www.uber.com/blog/fixrleak-fixing-java-resource-leaks-with-genai/
5•carimura•3d ago•1 comments

A Linux kernel developer plays with Home Assistant: case studies

https://lwn.net/SubscriberLink/1017945/93d12d28178b372e/
52•pabs3•8h ago•32 comments

The first year of free-threaded Python

https://labs.quansight.org/blog/free-threaded-one-year-recap
266•rbanffy•1d ago•265 comments

WebGL Gray-Scott Explorer (2012)

http://www.mrob.com/pub/comp/xmorphia/ogl/index.html
25•joebig•9h ago•2 comments

Java at 30: Interview with James Gosling

https://thenewstack.io/java-at-30-the-genius-behind-the-code-that-changed-tech/
209•chhum•21h ago•304 comments

Publisher: The Malloy Semantic Model Server

https://github.com/malloydata/publisher
4•cpard•3h ago•0 comments
Open in hackernews

New high-quality hash measures 71GB/s on M4

https://github.com/Nicoshev/rapidhash
63•nicoshev11•3d ago

Comments

wpollock•7h ago
Is rapidhash cache-friendly?
wmf•6h ago
Hash functions don't have any data reuse so none of them are cache-friendly.
benwills•4h ago
I think they may be asking about the CPU cache.
Dylan16807•4h ago
You have to go out of your way to make a hash that doesn't fit into L1, so again they're all basically the same.

You'll probably end up fitting entirely inside the reorder buffer plus a sequential stream from memory, with the actual caches almost irrelevant.

benwills•4h ago
Sure. Any worthwhile hash function will fit in the instruction cache. But there are ways to make more or less efficient use of the data cache.
Dylan16807•4h ago
> Any worthwhile hash function will fit in the instruction cache.

Yes, I'm talking about the data cache.

> But there are ways to make more or less efficient use of the data cache.

How?

You need to touch every byte of input, and nothing should be faster than going right through from start to end.

benwills•3h ago
I don't know you're experience with hash functions, so you may already know what I'm about to say.

This is a minor example, but since you asked...

https://github.com/Cyan4973/xxHash/blob/dev/xxhash.h#L6432

That's an example of a fair number of accumulators that are stored as XXHash goes through its input buffer.

Many modern hash functions store more state/accumulators than they used to. Previous generations of hash functions would often just have one or two accumulators and run through the data. Many modern hash functions might even store multiple wider SIMD variables for better mixing.

And if you're storing enough state that it doesn't fit in your registers, the CPU will put it into the data cache.

Dylan16807•3h ago
> And if you're storing enough state that it doesn't fit in your registers, the CPU will put it into the data cache.

And there's 150+ registers in the actual chip.

But my argument is more that there isn't really an efficient or inefficient way to use L1. So unless you have an enormous amount of state, the question is moot. And if you have so much state you're spilling to L2, that's not when you worry about good or bad cache use, that's a weird bloat problem.

Sesse__•1h ago
_Fitting_ in the instruction cache isn't hard, but you'd also ideally let there be room for some other code as well :-) For a hash map lookup, where the hashing is frequently inlined a couple of times, code size matters.
aidenn0•6h ago
At some point, hashes are fast enough. I'm not going to be switching from xxhash to shave 40 picoseconds off of hashing small keys, and for large keys it's already a few orders of magnitude faster than my NVMe drive.
neonsunset•6h ago
If whatever you are doing is heavy on hashmap lookups (and you are ok with not rewriting into something more bespoke+complicated) - the faster hash function and the cheaper baseline cost of calling it - the better (i.e. XXH3 can have disadvantages, with its popular impl. for dispatching to the necessary routine).

This looks like an interesting potential alternative to GxHash. GxHash is nice but sadly I found AES intrinsics to have somewhat high latency on AMD's Zen 2/3 cores, making it a loss on short strings (but until I measured it on our server hw, M4 Max sure had me fooled, it has way better latency despite retiring more AES operations!).

xkcd1963•4h ago
Question, what do you do if there is a collision? I saw the github table also mentioned collisions
lights0123•4h ago
They're extremely common in hashtables. You follow standard open addressing or separate chaining procedures: https://en.m.wikipedia.org/wiki/Hash_collision
LoganDark•2h ago
Non-mobile link: https://en.wikipedia.org/wiki/Hash_collision
saagarjha•4h ago
Fall back on secondary hashes or do probing
jandrewrogers•1h ago
Quality matters. XXH3 fails something like 15% of the tests in SMHasher3. There are faster hash functions with much better quality profiles.
rurban•3h ago
It's not the fastest on smhasher anymore. umash is better and faster, and gxhash is twice as fast. It's is however very hashmap friendly because of its small size. It's a wyhash variant
nicoshev11•3h ago
Hey Reini, the rapidhash version on the SMHasher repo is outdated. The latest version was published last Tuesday, I'll submit it to SMHasher shortly. This new version is much faster than the previous one, and still passes all tests. It should beat umash on your benchmarks.
Sesse__•2h ago
Am I right in that RAPIDHASH_UNROLLED is now mandatory and the function is thus much larger now?
curiouscoding•2h ago
I'd love to see some benchmarks/comparison on variable length strings. For strings with random length between 10 and 30, gxhash was significantly faster than xxhash for me. I would assume because it processes chunks of up to 32 chars at a time, avoiding branch misses.

Generally my feeling is that at these speeds, designing for branch-predictability for short strings might be more important than absolute throughput.

bandrami•2h ago
I saw the first four words and then was disappointed by the direction it took...
jandrewrogers•1h ago
Without getting too deep in the technical weeds, I will assert that rapidhash is an excellent small-key hash function and approximately the state-of-the-art for that purpose. There is nothing else better that I am aware of in this scope.

For bulk hashing there are better functions, but XXH3, GXHash, etc are not among them, being both slower and weaker than the state-of-the-art. Hash functions that can’t pass quality tests are not serious contenders.

kragen•40m ago
I feel like I'm missing an enormous amount of context here, and I can't be the only one.

How much better is it than old standbys like hashpjw or djb's favorite¹, and how? It's apparently 350 lines of code instead of 1–10 lines of code. That seems like an important way that it's worse. And it comes with a copyright license that requires you to add it to your documentation, so the risk of forgetting that creates a risk of copyright infringement.

How much faster is it hashing a small key like the string "__umulh"? Is it actually slower? Why does it have an array commented "default secret parameters" in the public GitHub repo? Are we supposed to change those?

The readme and https://scholar.google.com/scholar?hl=es&as_sdt=0%2C5&q=rapi... are no help here.

______

¹ while (s[i]) h = h * 33 + s[i++]; https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename...