Skip to content

Instantly share code, notes, and snippets.

@rkitover
rkitover / python-2.7.14-custom-static-openssl.patch
Last active February 4, 2021 09:59
static openssl patch for python 2.7.14
diff -ruN Python-2.7.14.orig/setup.py Python-2.7.14.new/setup.py
--- Python-2.7.14.orig/setup.py 2017-09-16 10:38:35.000000000 -0700
+++ Python-2.7.14.new/setup.py 2017-11-16 07:48:31.368080272 -0800
@@ -808,10 +808,15 @@
depends=['socketmodule.h'],
libraries=math_libs) )
# Detect SSL support for the socket module (via _ssl)
+ openssl_root = os.getenv('OPENSSL_ROOT')
+
search_for_ssl_incs_in = [
@jboner
jboner / latency.txt
Last active May 3, 2024 15:17
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD