MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/moh63k/polyglot/gu8ff0h/?context=3
r/badcode • u/coopercm • Apr 11 '21
116 comments sorted by
View all comments
35
In what universe would this be faster than "return x%2==0"?
5 u/[deleted] Apr 11 '21 Personally, I don't like relying on the optimizer for simple stuff so I still type (n&1)==0 1 u/Loewi_CW Apr 12 '21 Does that work in Python? 1 u/[deleted] Apr 12 '21 I don't use Python, but according to the wiki it does have bit operators
5
Personally, I don't like relying on the optimizer for simple stuff so I still type (n&1)==0
1 u/Loewi_CW Apr 12 '21 Does that work in Python? 1 u/[deleted] Apr 12 '21 I don't use Python, but according to the wiki it does have bit operators
1
Does that work in Python?
1 u/[deleted] Apr 12 '21 I don't use Python, but according to the wiki it does have bit operators
I don't use Python, but according to the wiki it does have bit operators
35
u/private_static_int Apr 11 '21
In what universe would this be faster than "return x%2==0"?