Comment

Comment by WeEatnKid

This particular use case (checking odd or even) doesn't even need to use the modulus operation -- which is expensive. A bitwise AND is much more efficient (provided that the compiler doesn't apply that optimization upon seeing % 2)
parent WeEatnKid 8 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton