Re:XOR'ing a register with itself is the idiom for zeroing i...
by scheme271 on Wednesday April 22, 2026 @04:14AM
(#47860607)
Energy consumption wasn't really a concern when the idiom developed. I don't think people really cared about the energy consumption of instructions until well into the x86-64 era.
[ Parent
| on HN ]
Re:XOR'ing a register with itself is the idiom for zeroing i...
by allenrb on Wednesday April 22, 2026 @08:56AM
(#47862903)
Not sure why this is being downvoted, but itβs absolutely correct. For most of the history of computing, people were happy that it worked at all. Being concerned about energy efficiency is a recent byproduct of mobile devices and, even more recently, giant amounts of compute adding up to gigawatts.
Re:XOR'ing a register with itself is the idiom for zeroing i...
by pishpash on Wednesday April 22, 2026 @05:26PM
(#47869498)
This take is anachronistic. Thermal issues were evident by the late 1990's. Of course by that time not many were working in x86 assembly but embedded systems sure cared about power.
People forget embedded predated mobile by a good 20 years.
Re:XOR'ing a register with itself is the idiom for zeroing i...
by imtringued on Thursday April 23, 2026 @04:08AM
(#47873312)
Nintendo's original Game Boy lasted 40 hours on two AA batteries in 1989. You can't reach those numbers without engineering for energy efficiency.