Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by jcul

13 hours ago

First version has a side effect of writing to small_numbers[0] always.

The compiler probability can't optimize that in the second version.

If it wrote unconditionally and incremented only in the if then I'd guess they would compile to the same thing.

0 comments

jcul

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities