We Who Value Simplicity Have Built Incomprehensible Machines
How creeping feature additions turn good ideas into morasses of incomprehensible options.
May 28, 2012
The 8086 "AAA" instruction seemed like a good idea at the time. In the 1970s, there was still a case to be made for operating on binary-coded decimal values, with two digits per byte. What's the advantage of BCD? Large values can be easily displayed without multi-byte division or multiplication. "ASCII Adjust After Addition" (AAA) was committed to the x86 hardware and 30+ years later it's still there, emulated in microcode, in every i7 processor. The C library function memcpy seemed like a good idea at the time. memmove was fast and robust, properly handling a case where the source and destination overlapped. That handling came at the expense of a few extra instructions that were enough of a concern to justify a second, "optimized" memory copying routine ( memcpy ). Since then, we've had to live with both functions, although there has yet to be an example of an application whose impressive performance can be credited to the absence of overlap-detection code i... Read full story on Dr.Dobb's
Post a comment to the original version of this story on Dr.Dobb's