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

Comment by gpderetta

2 months ago

You could argue that the setb and ret are not part of the leap year check itself. For example if the compiled inlined the call into a caller doing:

    if(is_leap_year_fast()) {...}

Then the ret would obviously go away and the setb wouldn't be necessary as it could generate directly a conditional jmp from the result of the cmp.

1 comment

gpderetta

Reply

npendleton  2 months ago

Hah, great point!

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities