Hacker News new | ask | show | jobs
by tdeck 3339 days ago
My favorite legacy x86 instructions are the BCD opcodes like AAA (Ascii Adjust after Addition). They are apparently now slower than doing the conversion and operations yourself, but are kept in there for compatibility with the original 8086.
1 comments

They likely decode to the same sequence of uops internally; I benchmarked them and they're basically the same speed as the equivalent sequence of simpler operations, but a lot shorter. See this item for more information:

https://news.ycombinator.com/item?id=8477254

However, they were much slower in the days of the P4 (which was really an oddity in x86 performance characteristics.)