Understanding Memory

Memory

As part of trying to understand how computer memory works, I am putting together some links on the best sources of information

In source code, incrementing a variable looks like a single operation but at cpu level it takes three instructions.

  1. Load from memory (RAM) into short term memory (registers)
  2. Perform the operation.
  3. Store the result in memory.

Atomic operations make the computer see the above as single operations also.

Data-Oriented Design

Three Common problems in memory

JIT Compilers

Overview of JIT here

Look at how to optimise code for JIT

Assembly

Overview here

Assembly

Web Assembly

Web Assembly