1 2 34
54 7
8
9
1 2 34
54 7
8
9
Reuse an existing Collection
♻
Functional programming
with algebraic data types
λ
Slide 127
Slide 127 text
1 2 34
54 7
8
9
1 2 34
54 7
8
9
Reuse an existing Collection
♻
Imperative rewrite with
COW optimization
#
Functional programming
with algebraic data types
λ
Slide 128
Slide 128 text
9
c de f gh i
j
1 2 34
54 7
8
9
1 2 34
54 7
8
9
Reuse an existing Collection
♻
Cache-aware data structures
and unsafe operations
⚙
Imperative rewrite with
COW optimization
#
Functional programming
with algebraic data types
λ
Slide 129
Slide 129 text
Reuse an existing Collection
♻
Slide 130
Slide 130 text
import BTree
Slide 131
Slide 131 text
import BTree
Slide 132
Slide 132 text
22m 40s
SortedArray NSOrderedSet AlgebraicTree COWTree BTree/1024
Time spent inserting 3 million random values
Slide 133
Slide 133 text
22m 40s
SortedArray NSOrderedSet AlgebraicTree COWTree BTree/1024
1.8s
7s
22s
14m 54s
22m 36s
Time spent inserting 3 million random values
Slide 134
Slide 134 text
No content
Slide 135
Slide 135 text
Thank You!
Slide 136
Slide 136 text
Thank You!
lorentey
Slide 137
Slide 137 text
Thank You!
lorentey @lorentey
Slide 138
Slide 138 text
No content
Slide 139
Slide 139 text
Acknowledgements
Cow picture courtesy of
freegreatpicture.com
Puppy pictures courtesy of
Floppy the Beagle