Settings

Theme

IsEven(int32_t) in O(1)

ceayo.neocities.org

1 points by ceayo 14 hours ago · 4 comments

Reader

metadope 7 hours ago

I don't see (C) the joke.

  inline bool isEven(int32_t x) { return (0 == (x & 1) ); }
ceayoOP 14 hours ago

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.

  • c-linkage 13 hours ago

    Yeah, but where are the performance numbers? :D

    • Someone 13 hours ago

      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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection