Skip to content

Instantly share code, notes, and snippets.

@eshelman
eshelman / latency.txt
Last active January 3, 2024 04:28 — forked from jboner/latency.txt
HPC-oriented Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference/hit 1.5 ns 4 cycles
Floating-point add/mult/FMA operation 1.5 ns 4 cycles
L2 cache reference/hit 5 ns 12 ~ 17 cycles
Branch mispredict 6 ns 15 ~ 20 cycles
L3 cache hit (unshared cache line) 16 ns 42 cycles
L3 cache hit (shared line in another core) 25 ns 65 cycles
Mutex lock/unlock 25 ns
L3 cache hit (modified in another core) 29 ns 75 cycles
@snaga
snaga / gist:7495184
Created November 16, 2013 02:35
postgresql.conf @ RDS for PostgreSQL
testdb=> SELECT name,setting,unit FROM pg_settings;
name | setting | unit
---------------------------------+---------------------------------------------+------
allow_system_table_mods | off |
application_name | psql |
archive_command | /etc/rds/dbbin/pgscripts/rds_wal_archive %p |
archive_mode | on |
archive_timeout | 300 | s
array_nulls | on |
authentication_timeout | 60 | s