Updated waterloo talk
This commit is contained in:
parent
71288ebe0e
commit
1f8c6b9151
|
@ -247,8 +247,8 @@
|
|||
<ol>
|
||||
<li class="fragment" style="margin-top: 30px">What does it mean for a data structure to be halfway between a Binary Tree and a Linked List?</li>
|
||||
<li class="fragment" style="margin-top: 30px">How would we access and manipulate such a data structure?</li>
|
||||
<li class="fragment" style="margin-top: 30px">When and how should a data structure transition?</li>
|
||||
<li class="fragment" style="margin-top: 30px">How do we automatically generate bespoke data-structures?</li>
|
||||
<!--<li class="fragment" style="margin-top: 30px">When and how should a data structure transition?</li>-->
|
||||
<li class="fragment" style="margin-top: 30px">How do we automatically generate such data-structures?</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
|
@ -667,19 +667,20 @@ public class TransitionMode extends Mode {
|
|||
</section>
|
||||
|
||||
<section>
|
||||
<h3 style="margin-bottom: 60px">Just-in-Time Data Structures</h3>
|
||||
<h3 style="margin-bottom: 60px">Fluid Data Structures</h3>
|
||||
<img src="graphics/Interface.png" height="200px" style="float: right; padding-top: 20px;">
|
||||
<p style="width: 460px;">A background thread incrementally optimizes the data structure.</p>
|
||||
<p style="width: 460px;">Continuous availability while performance improves.</p>
|
||||
<p style="width: 460px;">Encode COG sentences as functional$^*$ data structures.</p>
|
||||
<p style="width: 460px;">A background thread incrementally applies rewrites to optimize the data structure.</p>
|
||||
<p style="width: 460px;">Functional data structure allows continuous availability (while performance improves).</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Optimizer Work Loop</h3>
|
||||
<ol>
|
||||
<li class="fragment" style="margin-top: 30px">Which rewrite to apply?</li>
|
||||
<li class="fragment" style="margin-top: 30px">On what to apply it?</li>
|
||||
<li class="fragment" style="margin-top: 30px">Decide which rewrite to apply and where to apply it.</li>
|
||||
<li class="fragment" style="margin-top: 30px">Compute rewritten subtree.</li>
|
||||
<li class="fragment" style="margin-top: 30px">Deploy subtree into the data structure.</li>
|
||||
</ol>
|
||||
<p class="fragment" style="margin-top: 50px">A priority queue keeps track of available rewrite patterns</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
@ -711,18 +712,21 @@ public class TransitionMode extends Mode {
|
|||
|
||||
<section>
|
||||
<h3>Crack</h3>
|
||||
<p><b>Deqeue: </b> 1x Array</p>
|
||||
<p><b>Enqueue: </b> 2x Array</p>
|
||||
<p><b>Consume: </b> 1x Array</p>
|
||||
<p><b>Produce: </b> 2x Array, 1x BinTree</p>
|
||||
|
||||
<h3 style="margin-top: 60px">Sort</h3>
|
||||
<p><b>Deqeue: </b> 1x Array</p>
|
||||
<p><b>Enqueue: </b> 1x Sorted Array</p>
|
||||
<p><b>Consume: </b> 1x Array</p>
|
||||
<p><b>Produce: </b> 1x Sorted Array</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="figs/Split-Step1.svg">
|
||||
<p class="fragment grow"><b>Option 1:</b> Crack($Array_8(1 \ldots 8)$)</p>
|
||||
<p><b>Option 2:</b> Sort($Array_8(1 \ldots 8)$)</p>
|
||||
<p class="fragment">Crack and sort both consume an array.</p>
|
||||
<div class="fragment">
|
||||
<p class="fragment grow"><b>Option 1:</b> Crack($Array_8(1 \ldots 8)$)</p>
|
||||
<p><b>Option 2:</b> Sort($Array_8(1 \ldots 8)$)</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
@ -735,16 +739,19 @@ public class TransitionMode extends Mode {
|
|||
|
||||
<section>
|
||||
<img src="figs/Split-Step3.svg">
|
||||
<p class="fragment grow"><b>Option 1:</b> Crack($Array_4(1 \ldots 4)$)</p>
|
||||
<p><b>Option 1:</b> Crack($Array_4(1 \ldots 4)$)</p>
|
||||
<p><b>Option 2:</b> Sort($Array_4(1 \ldots 4)$)</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p>The set of rewrites available is a top-1 tree query.</p>
|
||||
<p class="fragment">Accelerate with materialized views, delta queries, and priority queues.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<section>
|
||||
<p>How to safely apply rewrites?</p>
|
||||
|
||||
<p class="fragment">Safe pointer hygene!</p>
|
||||
<p>Applying rewrites is expensive in a functional data structure.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
@ -765,7 +772,7 @@ public class TransitionMode extends Mode {
|
|||
<td class="fragment">Logical</td>
|
||||
<td class="fragment">Physical</td>
|
||||
</tr>
|
||||
<tr class="fragment"><td colspan="3">Add a level of indirection</td></tr>
|
||||
<tr class="fragment"><td></td><td class="fragment">Fluid DS</td><td>Functional DS</td></tr>
|
||||
<tr class="fragment">
|
||||
<td></td>
|
||||
<td><i>Handle</i></td>
|
||||
|
@ -779,16 +786,12 @@ public class TransitionMode extends Mode {
|
|||
<svg data-src="graphics/Handles.svg" class="stretch" />
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p>Does it work?</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="graphics/Threading-6.png" />
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<section>
|
||||
<p>Does it work?</p>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Incremental Structure Transitions</h3>
|
||||
<ol>
|
||||
|
@ -800,22 +803,21 @@ public class TransitionMode extends Mode {
|
|||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Example Policy</h3>
|
||||
<ol>
|
||||
<li>Crack arrays until threshold</li>
|
||||
<li>Sort unsorted arrays</li>
|
||||
<li>Merge binary trees</li>
|
||||
</ol>
|
||||
<h3>Setup</h3>
|
||||
<ul>
|
||||
<li>Hand Generated C++ Code</li>
|
||||
<li>$10^9$ records (8-byte key + 8-byte value = 16GB)</li>
|
||||
<li>Compared vs STL's std::ordered_map, std::unordered_map, Google's cpp-btree</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Setup</h3>
|
||||
<ul>
|
||||
<li>DSL compiler (Scala) generates C++ Code</li>
|
||||
<li>$10^9$ records (8-byte key + 8-byte value = 16GB)</li>
|
||||
<li>Compared vs STL's std::ordered_map, std::unordered_map, Google's cpp-btree</li>
|
||||
<li>Crack threshold $10^6 \rightarrow 10^9$
|
||||
</ul>
|
||||
<h3>Example Policy</h3>
|
||||
<ol>
|
||||
<li>Crack arrays until threshold $10^6 \rightarrow 10^9$</li>
|
||||
<li>Sort unsorted arrays</li>
|
||||
<li>Merge binary trees</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
@ -828,6 +830,11 @@ public class TransitionMode extends Mode {
|
|||
<img src="graphics/StagedTransformslookupVspolicytime.png" />
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Concurrency / Handles</h3>
|
||||
<img src="graphics/Threading-6.png" />
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Load + One Point Lookup</h3>
|
||||
<img src="graphics/DataSizeVsScanTime.png" />
|
||||
|
@ -839,6 +846,7 @@ public class TransitionMode extends Mode {
|
|||
<h3>Ongoing Work</h3>
|
||||
<ul>
|
||||
<li>Efficiently selecting optimizer targets with view maintenance</li>
|
||||
<li>DSL compiler to generate C++ code</li>
|
||||
<li>Synthesizing new structures & rules</li>
|
||||
<li>Modeling access and transformation costs</li>
|
||||
<li>Learning optimal policies</li>
|
||||
|
|
Loading…
Reference in a new issue