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 WirelessGigabit

3 years ago

What the purpose of the / 0xffff?

1 comment

WirelessGigabit

Reply

f1shy  3 years ago

Had the same question. This is the minimal implementation of the error, so there is no clue what was the original purpose.

I think as it is, it indexes a table where the first positions return tab[0], the next ffff/1ff will return tab[1] and so on.

If I see such a code at work I would reject it in less than 1ms

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities