O'Reilly logo

Clojure High Performance Programming by Shantanu Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Latency numbers every programmer should know

Hardware and software have progressed over the years. Latencies for various operations put things into perspective. The latency numbers for 2013 are as shown in the following table. (Reproduced with the permission of Aurojit Panda and Colin Scott of Berkeley University: http://www.eecs.berkeley.edu/~rcs/research/interactive_latency.html)

Operation

Time taken as of 2013

L1 cache reference

1 ns (nano second)

Branch mis-predict

3 ns

L2 cache reference

4 ns

Mutex lock/unlock

17 ns

Compress 1KB with Zippy (http://code.google.com/p/snappy/)

2 μs (1000 ns = 1 μs : micro second)

Send 2000 bytes over commodity network

500 ns (that is, 0.5 μs)

SSD random read

16 μs

Roundtrip in same datacenter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required