Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
The Power of 2
Igor Wiedler
April 12, 2017
Programming
0
160
The Power of 2
Igor Wiedler
April 12, 2017
Tweet
Share
More Decks by Igor Wiedler
See All by Igor Wiedler
Wide Event Analytics (LISA19)
igorw
3
850
a day in the life of a request
igorw
0
85
production: an owner's manual
igorw
0
96
LISP 1.5 Programmer's Manual: A Dramatic Reading
igorw
0
190
The Moral Character of Software
igorw
1
200
interdisciplinary computing (domcode)
igorw
0
170
miniKanren (clojure berlin)
igorw
1
180
End the war on tabs (phpnw14)
igorw
1
780
Lisp (laraconeu)
igorw
7
1.2k
Other Decks in Programming
See All in Programming
クリエイティブ系のウェブサイト制作で役立つCSS技法 / CSS for develop creative website
clockmaker
2
1.6k
CLI構築のススメ
nyankotaro
0
130
roadmap to rust 2024
matsu7874
1
870
Micro Frontends with Module Federation: Beyond the Basics @codecrafts2022
manfredsteyer
PRO
0
120
Android Architecture Design With Koin
agiuliani
0
240
How useEvent would change our applications
koba04
1
1.7k
GraphQL+KMM開発でわかったこと / What we learned from GraphQL+KMM development
kubode
0
130
iOSアプリの技術選択2022
tattn
6
2.5k
From Java 11 to 17 and beyond
josepaumard
0
300
質とスピード(2022春版、質疑応答用資料付き) / Quality and Speed 2022 Spring Edition
twada
PRO
29
18k
Kotlin 最新動向2022 #tfcon #techfeed
ntaro
1
1.1k
既存画面の Jetpack Composeでの書き換え: FAANSでの事例紹介 / Case study of rewriting existing screens with Jetpack Compose
horie1024
0
250
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
85
3.9k
Happy Clients
brianwarren
89
5.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
237
19k
Building Flexible Design Systems
yeseniaperezcruz
310
33k
The Invisible Side of Design
smashingmag
289
48k
WebSockets: Embracing the real-time Web
robhawkes
57
5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
226
15k
Rails Girls Zürich Keynote
gr2m
86
12k
What's new in Ruby 2.0
geeforr
336
30k
Raft: Consensus for Rubyists
vanstee
126
5.4k
Art Directing for the Web. Five minutes with CSS Template Areas
malarkey
196
9.4k
The Cult of Friendly URLs
andyhume
68
4.7k
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