Remember that there is a computer in computer science. It is important to understand what your code runs on and the effects that this has; this isn't magic.
Computers are so fast that it can be difficult to understand which operation is a quick operation and which one is slow. Everything appears instant. In fact, anything that happens in less than a few hundred milliseconds is imperceptible to humans. However, certain things are much faster than others are, and you only get performance issues at scale when millions of operations are performed in parallel.
There are various different resources that can be accessed by an application and a selection of these are listed as follows:
- CPU caches and registers:
- L1 cache
- L2 cache
- L3 cache
- RAM
- Permanent storage:
- Local Solid State Drive (SSD)
- Local Hard Disk Drive (HDD)
- Network resources:
- Local Area Network (LAN)
- Regional networking
- Global internetworking
Virtual Machines (VMs) and cloud infrastructure services may simplify...