Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
IsEven(int32_t) in O(1) (ceayo.neocities.org)
1 point by ceayo 10 days ago | hide | past | favorite | 4 comments




I don't see (C) the joke.

  inline bool isEven(int32_t x) { return (0 == (x & 1) ); }

So after reading a link from here from yesterday I decided to make my own implementation for checking evenness of numbers, and making it more optimized.

Yeah, but where are the performance numbers? :D

I don’t see how that needs that “:D”

Is there any standard that says anything about the performance of fseek?

If not, how can one claim that this is O(1)? :D




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: