2 ms·
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
by kidintech 7y ago
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.
- mrgriffin 7y agoFrom 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.
- kidintech 7y agoYeah 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.