피터 노빅
피터 노빅

좋은 프로그래머가 되려면 컴퓨터가 명령어를 실행시키는 데 걸리는 시간.
메모리에서 데이터를 가져오는 데 걸리는 시간(캐시 히트 또는 미스가 날 때를 각각).
디스크에서 데이터를 읽어오거나 탐색하는 데 걸리는 시간을 잘 알고 있어야 한다.

Peter Norvig

그 답은 아래 표에 나와있다.

명령 시간
execute typical instruction 1/1,000,000,000 sec = 1 nanosec
fetch from L1 cache memory 0.5 nanosec
branch misprediction 5 nanosec
fetch from L2 cache memory 7 nanosec
Mutex lock/unlock 25 nanosec
fetch from main memory 100 nanosec
send 2K bytes over 1Gbps network 20,000 nanosec
read 1MB sequentially from memory 250,000 nanosec
fetch from new disk location (seek) 8,000,000 nanosec
read 1MB sequentially from disk 20,000,000 nanosec
send packet US to Europe and back 150 milliseconds = 150,000,000 nanosec

출처는 피터 노빅의 홈페이지