logoalt Hacker News

willhsladeyesterday at 11:09 PM3 repliesview on HN

Are compilers deterministic?


Replies

ua709yesterday at 11:41 PM

I'm sure someone, somewhere, once wrote one that wasn't but in general, yes they are.

The ones I use certainly are. And with a bit of training you can reason and predict how they will respond to a given input with a large degree of accuracy without being familiar with how the particular compiler under question was implemented.

Not so with the AI tools. At least with the ones I use anyway.

dbalaterotoday at 12:55 AM

Given the same compiler, I believe they would be the same between runs given the same inputs. I suppose that could not be true at the margins, but I would expect correctness out of whatever path it chose.

23dfyesterday at 11:59 PM

For all intents and purposes yeh. Its really about the variance in actual outcomes vs the expected. The variance is not much is it? With LLMs that absolutely isnt the case.