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?

American Medical Association Backs Classification of Nearsightedness as Disease

https://www.aao.org/newsroom/news-releases/detail/ama-backs-formal-classification-nearsightedness
1•plun9•20s ago•0 comments

A remote island, these GPS hackers are preparing for an invisible war

https://www.bbc.com/future/article/20260908-inside-the-fight-to-protect-the-worlds-satellite-signals
1•rayhaanj•1m ago•0 comments

AI staff 'genuinely frightened' for humanity's future

https://www.bbc.com/news/articles/c1kx0gyje9wo
1•dabinat•2m ago•0 comments

Africa's Airliner Fleet May More Than Double by 2045

https://humanprogress.org/africas-commercial-fleet-to-more-than-double-by-2045/
1•andsoitis•5m ago•0 comments

Generating running routes with GPT-6 Astra and ChatGPT Work

https://simonwillison.net/2026/Sep/12/astra-running-routes/
1•tosh•7m ago•0 comments

A metaphorical "Royal Road" in famous quotations

https://en.wikipedia.org/wiki/Royal_Road
1•Bluestein•7m ago•0 comments

Life in Numbers

https://humanprogress.org/ylin/
1•andsoitis•8m ago•0 comments

Huawei Mate XT 2 hands on ($3000 trifold) [video]

https://www.youtube.com/watch?v=FRrS54oHqlw
1•djfergus•8m ago•0 comments

AI agents tested by OpenAI involved in cyber-attack on service, say researchers

https://www.theguardian.com/technology/2026/sep/11/openai-agents-rubygems-malicious-packages
2•nobody9999•10m ago•0 comments

Life Options Are Expanding

https://humanprogress.org/trends/life-options-are-expanding/
1•andsoitis•10m ago•0 comments

New Science Says Scrapping a Working Gas Car for an EV Is Usually Greener

https://cleantechnica.com/2026/08/16/scrapping-working-gas-car-for-ev-can-be-greener/
1•xbmcuser•15m ago•0 comments

Chimps beat people in memory task (2007)

https://www.theguardian.com/science/2007/dec/04/animalbehaviour.evolution
1•mellosouls•15m ago•0 comments

Remove the need for planning permission for external shutters on properties (UK)

https://petition.parliament.uk/petitions/778193
1•DamonHD•18m ago•0 comments

I rebuilt iMessage line for line. Nobody wanted it

https://sage.me/imessage
2•blsage•20m ago•0 comments

The News Tonight Is AI Danger

https://cmart.blog/the-news-tonight-is-ai-danger/
3•chrismartin•22m ago•0 comments

Designing Cycle-Exact Delays on Several 8-Bit CPUs

https://bumbershootsoft.wordpress.com/2026/09/12/designing-cycle-exact-delays-on-several-8-bit-cpus/
1•ibobev•23m ago•0 comments

Nanite Cluster Memory

https://real-mrbeam.github.io/2026/09/12/Nanite-Cluster-Memory.html
2•ibobev•23m ago•0 comments

Sierra digital cameras on the Apple II

https://www.colino.net/wordpress/archives/2026/09/11/sierra-digital-cameras-on-the-apple-ii/
2•ibobev•24m ago•0 comments

TuragaLab/flybody: MuJoCo fruit fly body model and locomotion RL tasks

https://github.com/TuragaLab/flybody
1•olalonde•26m ago•0 comments

View-Dependent Proxy

https://armandsumo.com/posts/view-dependent-proxy/
2•rslice•27m ago•0 comments

Find investors for your startup – Investor Match Guaranteed

https://leadagentx.ai
1•liranbr•31m ago•0 comments

Why So Many AI Researchers Think the Machines Could Kill Everyone

https://www.wired.com/story/why-so-many-ai-researchers-think-the-machines-could-kill-everyone/
3•joozio•33m ago•0 comments

Guidance on Using CC Licenses in an AI Ecosystem

https://creativecommons.org/2026/09/03/guidance-on-using-cc-licenses-in-an-ai-ecosystem/
1•Tomte•39m ago•0 comments

Created a local AI to save data

https://github.com/just-not-google/BiNeuron
1•BiNeuron•50m ago•0 comments

Petroleum Refining

https://courses.ems.psu.edu/fsc432/node/2
2•pmontra•51m ago•0 comments

Faulty reward functions in the wild (2016)

https://openai.com/index/faulty-reward-functions/
1•tosh•54m ago•0 comments

MetaPost library for black and white illustrations

https://github.com/jemmybutton/fiziko
2•mjmas•56m ago•0 comments

Actuali: free Actual Budget client for iOS

https://actuali.mfazz.com/
1•itchingsphynx•1h ago•0 comments

Selling Out

https://www.seangoedecke.com/selling-out/
2•ckardaris•1h ago•0 comments

The Coxon psyop was a decade and more than a billion dollars in the making

https://xcancel.com/antibot/captcha
3•thelastgallon•1h ago•4 comments