logoalt Hacker News

ThrowawayR2last Wednesday at 3:09 PM2 repliesview on HN

All of which are completely irrelevant implementation details hidden behind the ISA. The x86-64 ISA promises execution of instructions in the specified order, a certain number of registers, etc. and that's all they need to know.


Replies

tsimionesculast Thursday at 9:38 AM

The claim is that learning assembler first will build a better intuition about the inner workings, and thus performance, of the processor.

The reality is that any assembler simple enough to be taught as your first contact with programming will leave you with a wrong intuition about how modern processors work, and thus a wrong intuition about the relative performance of various operations.

Having no intuition about something is better than building a bad intuition, especially at the beginning of your learning journey.

Someonelast Wednesday at 4:59 PM

> The x86-64 ISA promises execution of instructions in the specified order

It doesn’t, and out-of-order CPUs don’t do that. https://en.wikipedia.org/wiki/Out-of-order_execution: “In this paradigm, a processor executes instructions in an order governed by the availability of input data and execution units, rather than by their original order in a program.”

show 2 replies