Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Power of 2
Search
Igor Wiedler
April 12, 2017
Programming
340
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The Power of 2
Igor Wiedler
April 12, 2017
More Decks by Igor Wiedler
See All by Igor Wiedler
Redis Bedtime Stories
igorw
1
360
Wide Event Analytics (LISA19)
igorw
4
940
a day in the life of a request
igorw
0
170
production: an owner's manual
igorw
0
200
LISP 1.5 Programmer's Manual: A Dramatic Reading
igorw
0
480
The Moral Character of Software
igorw
1
310
interdisciplinary computing (domcode)
igorw
0
320
miniKanren (clojure berlin)
igorw
1
330
End the war on tabs (phpnw14)
igorw
1
1.1k
Other Decks in Programming
See All in Programming
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.7k
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
160
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
140
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
1k
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
260
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
250
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
780
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
150
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
960
Lessons from Spec-Driven Development
simas
PRO
0
240
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
190
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
24k
Color Theory Basics | Prateek | Gurzu
gurzu
0
380
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
How to Ace a Technical Interview
jacobian
281
24k
Paper Plane (Part 1)
katiecoart
PRO
0
9.5k
Code Reviewing Like a Champion
maltzj
528
40k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.7k
It's Worth the Effort
3n
188
29k
Transcript
the power of 2 @igorwhilefalse
2n
2×2×… n
2 4 8
2 4 8 16 32 64 128 256
2 4 8 16 32 64 128 256 512 1024
2048 4096 8192 16384 32768 65536
2 4 8 16 32 64 128 256 512 1024
2048 4096 8192 16384 32768 65536 131K 262K 524K 1M 2M 4M 8M 16M 33M 67M 134M 268M 536M 1B 2B 4B 8B 17B 34B 68B 137B 274B 549B 1T 2T 4T 8T 17T 35T 70T 140T 281T 562T 1Q 2Q 4Q 9Q 18Q 36Q 72Q 144Q 288Q 576Q 1Quint 2Quint 4Quint 9Quint 18Quint
18'446'744'073'709'551'616
18'446'744'073'709'551'616 grains of rice
alot by @alliebrosh
2 4 8 16 32 64 128 256 512 1024
2048 4096 8192 16384 32768 65536 131K 262K 524K 1M 2M 4M 8M 16M 33M 67M 134M 268M 536M 1B 2B 4B 8B 17B 34B 68B 137B 274B 549B 1T 2T 4T 8T 17T 35T 70T 140T 281T 562T 1Q 2Q 4Q 18Q 36Q 72Q 144Q 288Q 576Q 1Quint 2Quint 4Quint 9Quint 18Quint
2 4 8 16 32 64 128 256 512 1024
2048 4096 8192 16384 32768 65536 131K 262K 524K 1M 2M 4M 8M 16M 33M 67M 134M 268M 536M 1B 2B 4B 17B 34B 68B 137B 274B 549B 1T 2T 4T 8T 17T 35T 70T 140T 281T 562T 1Q 2Q 4Q 9Q 18Q 36Q 72Q 144Q 288Q 576Q 1Quint 2Quint 4Quint 9Quint 18Quint
2 4 8 16 32 64 128 256 512 1024
2048 4096 8192 16384 32768 65536 131K 262K 524K 1M 2M 4M 8M 16M 33M 67M 134M 268M 536M 1B 2B 4B 8B 17B 34B 68B 137B 274B 549B 1T 2T 4T 8T 17T 35T 70T 140T 281T 562T 1Q 2Q 4Q 9Q 18Q 36Q 72Q 144Q 288Q 576Q 1Quint 2Quint 4Quint 9Quint 18Quint
2 4 8 16 32 64 128 256 512 1024
2048 4096 8192 16384 32768 65536 131K 262K 524K 1M 2M 4M 8M #cafeee 33M 67M 134M 268M 536M 1B 2B 4B 8B 17B 34B 68B 137B 274B 549B 1T 2T 4T 8T 17T 35T 70T 140T 281T 562T 1Q 2Q 4Q 9Q 18Q 36Q 72Q 144Q 288Q 576Q 1Quint 2Quint 4Quint 9Quint 18Quint
2 4 8 16 32 64 128 256 512 1024
2048 4096 8192 16384 32768 65536 131K 262K 524K 1M 2M 4M 8M 16M 33M 67M 134M 268M 536M 1B 2B 4B 8B 17B 34B 68B 137B 274B 549B 1T 2T 4T 8T 17T 35T 70T 140T 281T 562T 1Q 2Q 4Q 9Q 18Q 36Q 72Q 144Q 288Q 576Q 1Quint 2Quint 4Quint 9Quint 18Quint
2 4 8 16 32 64 128 256 512 1024
2048 4096 8192 16384 32768 65536 131K 262K 524K 1M 2M 4M 8M 16M 33M 67M 134M 268M 536M 1B 2B 4B 8B 17B 34B 68B 137B 274B 549B 1T 2T 4T 8T 17T 35T 70T 140T 281T 562T 1Q 2Q 4Q 9Q 18Q 36Q 72Q 144Q 288Q 576Q 1Quint 2Quint 4Quint 9Quint 18Quint
2 4 8 16 32 64 128 256 512 1024
2048 4096 8192 16384 32768 65536 131K 262K 524K 1M 2M 4M 8M 16M 33M 67M 134M 268M 536M 1B 2B 4B 8B 17B 34B 68B 137B 274B 549B 1T 2T 4T 8T 17T 35T 70T 140T 281T 562T 1Q 2Q 4Q 9Q 18Q 36Q 72Q 144Q 288Q 576Q 1Quint 2Quint 4Quint 9Quint 18Quint
2n
exponential growth • population growth • infection (zombie apocalypse) •
economic growth (mod humans) • moore's law
crypto • one char = { 0 1 2 3
4 5 6 7 8 9 a b c d e f } • possible values: 161 = 16 • two chars = { 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f ... } • possible values: 162 = 256 • 64 bit key: 264 = 1616 = 18Quint
we scaled up let's scale down
log2 n
n÷2÷…=1 y
dress shopping
dress shopping
dress shopping
dress shopping
dress shopping
dress shopping
dress shopping
binary search
database
log2 n
log2 (18'446'744'073'709'551'616) = 64
atoms • atoms in a human body: 7×1027 =>
7'000'000'000'000'000'000'000'000'000 => log2 = 92 • atoms in observable universe: 4×1079 => 40'000'000'000'000'000'000'000'000'000 '000'000'000'000'000'000'000'000'000 '000'000'000'000'000'000'000'000 => log2 = 264
recap • 2n grows large fast 232 = 4B 264
= 18Quint • log2 n decreases quickly log2 4B = 32 log2 18Quint = 64 yay crypto and grains of rice yay databases and dresses
thank u zine: igor.io/pow @igorwhilefalse