Re:Why Learn Compilers
by WalterBright on Monday May 29, 2023 @08:44PM
(#36119899)
The compiler is deterministic - for the same inputs, you'll get the same outputs. Unless you've got memory corruption in it.
[ Parent
| on HN ]
Many optimizers (and other algorithms used in compilers) can benefit from some random bits.
Though, of course, in practice you can use pseudo-random bits and fix the seed.
Re:Why Learn Compilers
by WalterBright on Monday May 29, 2023 @09:55PM
(#36120348)
Having a compiler produce different code for the same source is a recipe for "I can't reproduce your bug and can't fix it".
Or unless you iterate over randomized hashtables to produce some output, e.g. function sections in an executable. Though that doesn't change the semantics and is basically rearranging coins in your pocket.