1168
Tell me the truth ... (piefed.jeena.net)
you are viewing a single comment's thread
view the rest of the comments
[-] Jankatarch@lemmy.world 5 points 1 year ago* (last edited 1 year ago)

I mean is it really a waste? What's minimum amount of bits most CPUs read in one cycle.

[-] excral@feddit.org 12 points 1 year ago

In terms of memory usage it's a waste. But in terms of performance you're absolutely correct. It's generally far more efficient to check is a word is 0 than to check if a single bit is zero.

[-] Aux@feddit.uk 0 points 1 year ago

Usually the most effective way is to read and write the same amount of bits as the architecture of the CPU, so for 64 bit CPUs it's 64 bits at once.

this post was submitted on 15 May 2025
1168 points (98.6% liked)

Programmer Humor

31593 readers
1174 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS