News for hackers. Stuff that matters.
Re:How an Optimizing Compiler Works by kidintech on Tuesday November 12, 2019 @04:57AM (#21512904)
Have I not drank my coffee today or does the 'multiplied' value in the strawman program never change?

It starts at 0 and keeps multiplying itself with integers, which should always result in 0.

EDIT: My bad, it is explained after the code snippet, but not immediately after so I didn't catch it at first.

Re:How an Optimizing Compiler Works by mrgriffin on Tuesday November 12, 2019 @04:58AM (#21512910)
From the article:

> multiplied does not: it starts off 0, and every time it is multiplied via multiplied = multiplied * count it remains 0.

The article then goes on to use that fact for some optimizations.

Re:How an Optimizing Compiler Works by kidintech on Tuesday November 12, 2019 @05:01AM (#21512919)
Yeah haha, caught it just after I wrote my comment. IMO, I expected the author to talk about that right after the snippet, as it was the first thing that stuck out.