cm0002@lemmy.world to Programmer Humor · 2 days agoTell me the truth ...piefed.jeena.netimagemessage-square143linkfedilinkarrow-up11.16Karrow-down116
arrow-up11.15Karrow-down1imageTell me the truth ...piefed.jeena.netcm0002@lemmy.world to Programmer Humor · 2 days agomessage-square143linkfedilink
minus-squareJankatarch@lemmy.worldlinkfedilinkarrow-up5·edit-21 day agoI mean is it really a waste? What’s minimum amount of bits most CPUs read in one cycle.
minus-squareAux@feddit.uklinkfedilinkEnglisharrow-up1·8 hours agoUsually 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.
minus-squareexcral@feddit.orglinkfedilinkarrow-up11·1 day agoIn 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.
I mean is it really a waste? What’s minimum amount of bits most CPUs read in one cycle.
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.
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.