frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: DualMix128 – A fast, simple PRNG passing PractRand (32TB) and BigCrush

https://github.com/the-othernet/DualMix128
5•the_othernet•1y ago
Hi HN,

I'd like to share DualMix128, a pseudo-random number generator I developed. It's written in C and achieves very high speed while maintaining strong statistical properties for non-cryptographic use.

GitHub (MIT License): https://github.com/the-othernet/DualMix128

Key points:

* *Fast:* Benchmarked at ~0.36 ns per 64-bit generation on GCC 11.4 (-O3 -march=native). This was over 2x faster than `xoroshiro128++` (~0.74 ns) and competitive with `wyrand` (~0.36 ns) in the same tests. (Benchmark code/results in repo).

* *Robust:* Passes the full TestU01 BigCrush suite and PractRand up to 32TB with no anomalies reported. (Test harnesses/logs in repo).

* *Simple Algorithm:* Uses a 128-bit state (two `uint64_t`) with simple mixing based on addition, XOR, rotation, and a final multiplication by the golden ratio constant.

* *C Implementation:* Minimal dependencies (`stdint.h` for core), straightforward C code.

This came out of exploring simple constructions for efficient PRNGs that still hold up under heavy statistical testing.

Curious to hear feedback on the design, performance, potential applications, or any weaknesses you might spot. Thanks!

Comments

thomaskoopman•1y ago
Very cool, fast and looks like it should vectorize too. Do you have a jump function for parallel seeding?

How did you come up with this, some number-theoretic basis or more experimental?

War Atlas: An interactive cartography of every named war in human history

https://waratlas.org
1•NaOH•51s ago•0 comments

SpaceX wants to launch 100k more Starlink satellites – for 100x the bandwidth

https://www.zdnet.com/home-and-office/networking/spacex-wants-to-launch-100000-more-starlink-sate...
2•CrankyBear•2m ago•0 comments

Uiua - A tacit array programming language

https://www.uiua.org/
1•weinzierl•3m ago•0 comments

Train the Agent, Then Replace It

https://allthesethings.substack.com/p/train-the-agent-then-replace-it
1•taubek•4m ago•0 comments

"Disk Not Ejected Properly": What It Means

https://bombich.com/blog/2026/07/07/disk-not-ejected-properly
1•speckx•4m ago•0 comments

Generating Effects

https://othermeans.substack.com/p/generating-effects
1•Tomte•5m ago•0 comments

Bun vs. Deno vs. Node.js 2026: Real Benchmarks Mislead

https://byteiota.com/bun-vs-deno-vs-node-js-2026-real-benchmarks-mislead/
3•h1696UOuk•5m ago•0 comments

The Work of Helping A.I. Destroy Work

https://www.nytimes.com/2026/07/10/business/ai-white-collar-jobs.html
1•apparent•6m ago•0 comments

The 2025–2026 Evolution of Generative Spatial AI

https://hal9.com/articles/the-2025-2026-evolution-of-generative-spatial-ai
1•javierluraschi•6m ago•0 comments

Alarm over launch of facial recognition in UK shops that instantly alerts police

https://www.theguardian.com/technology/2026/jul/10/facewatch-facial-recognition-uk-shops-instantl...
2•pseudolus•7m ago•0 comments

Why Stone-Faced Fascists Keep Getting Antiquity Wrong

https://www.thebulwark.com/p/why-stone-faced-fascists-keep-getting-antiquity-wrong-x-twitter-elon...
1•Tomte•10m ago•0 comments

Property Graphs in PostgreSQL

https://www.postgresql.org/docs/19/ddl-property-graphs.html
1•throwaway7783•11m ago•0 comments

Boom Prize: $750k to the first amateur RC plane that breaks the sound barrier

https://boomsupersonic.com/prize
1•dwwoelfel•11m ago•0 comments

Disable autoplay and infinite scroll or risk fines, EU tells Meta

https://arstechnica.com/tech-policy/2026/07/disable-auto-play-and-infinite-scroll-or-risk-massive...
2•OptionOfT•12m ago•0 comments

I Think I Know How to Solve the Video Game Industry's Problems

https://ggtribune.com/2026/07/10/opinion-i-think-i-know-how-to-solve-the-video-game-industrys-pro...
1•qdot76367•13m ago•0 comments

MagicView Advertising for Startups

https://www.magicview.com/
1•wesley-zheng•13m ago•0 comments

The Road to Housing Act Might Pass

https://inpractice.yimbyaction.org/p/the-road-to-housing-act-might-actually
2•viajante1882•15m ago•0 comments

China recaptures the first stage of a rocket to reuse it

https://phys.org/news/2026-07-china-page-spacex-recaptures-stage.html
2•miohtama•16m ago•0 comments

Dangerzone: Convert potentially dangerous documents into safe PDFs

https://dangerzone.rocks/
1•Cider9986•16m ago•0 comments

PQC Readiness and Migration Tool

https://postq.dev
1•PallabPaul•17m ago•0 comments

The Difference Between Watercolor and Gouache Paints

https://www.jetpens.com/blog/The-Difference-Between-Watercolor-and-Gouache-Paints/pt/963
2•ynac•17m ago•0 comments

Big Tech Doubles Debt Load to $350B in AI Spending Spree

https://www.bloomberg.com/news/articles/2026-07-10/big-tech-doubles-debt-load-to-350-billion-in-a...
2•thm•17m ago•1 comments

Hackachu: Building Pokémon-inspired games to earn hardware

https://hackachu.hackclub.com/
1•Plastuchino•18m ago•0 comments

Blood Cell 'Nurseries' Upend Understanding of Human Physiology

https://news.feinberg.northwestern.edu/2026/07/02/blood-cell-nurseries-upend-understanding-of-hum...
1•gmays•20m ago•0 comments

How to Read Scientific Papers (Or Give Good Dating Advice)

https://serenakrejcipapa.substack.com/p/how-to-read-scientific-papers-or
1•herbertl•20m ago•0 comments

Lessons from the UK's first trial scheme for electrical repairs

https://relondon.gov.uk/resources/case-study-north-london-repair-voucher-scheme-lessons-from-the-...
1•DamonHD•20m ago•0 comments

The Joy of Old-School Coding After a Stupid Mistake

https://canro91.github.io/2026/07/04/JoyOfCoding/
1•speckx•21m ago•0 comments

Ethical NBA Championships

https://pudding.cool/2026/06/ethical-champions/
1•colinprince•22m ago•0 comments

The inventor of the outside white stripes on roads

https://www.iflscience.com/one-simple-idea-has-quietly-saved-millions-of-lives-over-the-last-70-y...
1•toss1•22m ago•0 comments

Are Memories Transferable – Or Edible?

https://www.quantamagazine.org/are-memories-transferable-or-edible-20260605/
1•CGMthrowaway•22m ago•0 comments