logoalt Hacker News

rezonantyesterday at 5:34 AM2 repliesview on HN

You'll need to share with the class because compilers are pretty damn deterministic.


Replies

pjmlpyesterday at 10:51 AM

Not if they are dynamic compilers.

Two runs of the same programme can produce different machine code from the JIT compiler, unless everything in the universe that happened in first execution run, gets replicated during the second execution.

show 2 replies
fragmedeyesterday at 8:03 AM

Only mostly, and only relatively recently. The first compiler is generally attributed to Grace Hopper in 1952. 2013 is when Debian kicked off their program to do bit-for-bit reproducible builds. Thirteen years later, Nixos can maybe produce bit-for-bit identical builds if you treat her really well. We don't look into the details because it just works and we trust it to work, but because computers are all distributed systems these days, getting a bit-for-bit identical build out of the compiler is actually freaking hard. We just trust them to work well enough (and they do), but they've had three fourths of a century to get there.