This repository was archived by the owner on Aug 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtpopt0.html
More file actions
682 lines (643 loc) · 26.6 KB
/
Copy pathtpopt0.html
File metadata and controls
682 lines (643 loc) · 26.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Pragmatic optimization in modern programming</title>
<meta name="description" content="Pragmatic optimization in modern programming">
<meta name="author" content="geek">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/beige.css" id="theme">
<link rel="stylesheet" href="css/customization.css">
<link rel="stylesheet" href="lib/css/zenburn.css">
<link rel="shortcut icon" href="images/ico/favicon.ico">
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>Pragmatic optimization</h1>
<h2>In modern programming</h2>
<h3>Ordering optimization approaches</h3>
<p>
<small>Created by
<a href="https://github.com/cuda-geek">Marina (geek) Kolpakova</a>
for
<a href="unn.ru">UNN</a>
/ 2015-2016
</small>
</p>
</section>
<section>
<h2>Course Topics</h2>
<ul>
<li><b>Ordering optimization approaches</b></li>
<li>Demystifying a compiler</li>
<li>Mastering compiler optimizations</li>
<li>Modern computer architectures concepts</li>
</ul>
</section>
<section>
<h2>Outline</h2>
<ul>
<li>What is optimization?</li>
<li>Pragmatic approach</li>
<li>Optimization trade-offs</li>
<li>Knowledge which is required</li>
<li>Where to get the performance?</li>
<li>Optimization cycle</li>
<li>Top-Down (High-low) approach</li>
<li>Optimization cycle (revised)</li>
<li>Optimization steps overview</li>
<li>How to learn optimization?</li>
<li>Recommended literature</li>
<li>Summary</li>
</ul>
</section>
<section>
<h2>What is optimization?</h2>
<blockquote>In computing, <b>optimization</b> is a process of modifying a system to make some aspect of it
to work more efficiently or use fewer resources, in particular, a process of transforming a piece of code
to make it <b>more efficient without changing its output</b>.</blockquote>
</section>
<section>
<h2>Pragmatic approach</h2>
<blockquote>
“Programmers waste enormous amounts of time thinking about, or worrying about, the speed of non-critical
parts of their programs, and these attempts at efficiency actually have a strong negative impact when
debugging and maintenance are considered. We should forget about small inefficiencies, say about 97% of the time;
<b>premature optimization is the root of all evil</b>. Yet we should not pass up our opportunities in
that critical 3%.“
<div style="text-align:right;">
<small>-Donald Knuth, Structured Programming With go to Statements</small>
</div>
</blockquote>
<ol style="width: 50%">
<li><b>Find what to start from (3%)</b></li>
<li><b>Know when to stop (97%)</b></li>
</ol>
</section>
<section>
<h2>Optimization trade-offs</h2>
<ul>
<li>Code portability decreases when we go deeper</li>
<li>Performance portability decreases when we go deeper</li>
<li>The cost of maintenance and extensibility increases<br> when we go deeper</li>
<li>Optimizations are often not reusable</li>
<li>Optimizations become obsolete very quickly</li>
</ul>
<p><strong>...but still performance is a crucial requirement for most applications.</strong></p>
</section>
<section>
<h2>Knowledge which is required</h2>
<ol>
<li><b>The code</b>
<ul>
<li>The problem, it solves</li>
<li>The algorithm, it implements</li>
<li>The algorithmic complexity</li>
</ul>
</li>
<li><b>The compiler</b>
<ul>
<li>Compilation trajectory</li>
<li>Compiler's capabilities and obstacles</li>
</ul>
</li>
<li><b>The platform</b>
<ul>
<li>Architecture capabilities
<ul>
<li>
I<small style="vertical-align: bottom">nstruction</small>
S<small style="vertical-align: bottom">et</small>
A<small style="vertical-align: bottom">rchitecture</small>
</li>
</ul></li>
<li>Micro-architecture specifics</li>
</ul>
</li>
</ol>
</section>
<section>
<h2>Where to get the performance?</h2>
<br/><br/>
<table style="font-size:2em;">
<colgroup>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<td style="padding:0.1em; padding-right: 1em; text-align: right;">High-level</td>
<td style="padding:0.1em;">Programmer</td>
</tr>
<tr>
<td style="padding:0.1em; padding-right: 1em; text-align: right;">Middle-level</td>
<td style="padding:0.1em;">Compiler</td>
</tr>
<tr>
<td style="padding:0.1em; padding-right: 1em; text-align: right;">Low-level</td>
<td style="padding:0.1em;">Hardware</td>
</tr>
</tbody>
</table>
</section>
<section>
<h2>Optimization cycle</h2>
<img alt="Optimization cycle" class="simple" src="images/popt/opt_cycle.svg"/>
</section>
<section>
<h2>Top-Down (High-low) approach</h2>
<ol style="width: 60%">
<li>Understand the code</li>
<li>Use appropriate algorithms
<br><br>
</li>
<li>Optimize memory access patterns</li>
<li>Minimize number of operations
<br><br>
</li>
<li>Shrink the critical path</li>
<li>Perform HW-specific optimizations
<br><br>
</li>
<li>Dive into assembly</li>
</ol>
</section>
<section>
<h2>Optimization cycle (revised)</h2>
<img alt="Optimization cycle(reviced)" class="simple" src="images/popt/opt_cycl_reviced.svg"/>
</section>
<section>
<h2>step #1: Understand the code</h2>
<ul>
<li>Different people think differently
<ul>
<li>you'll need some time to get used to the code</li>
</ul>
<br>
</li>
<li><b>Understand dataflow</b>
<ul>
<li>input/output parameters</li>
<li>data dependencies</li>
</ul>
<br/>
</li>
<li><b>Identify performance limiters</b>
<ul>
<li>Time</li>
<li>Profile</li>
<li>Collect metrics
<ul>
<li>e.g. CPI, power consumption</li>
</ul></li>
</ul>
</li>
</ul>
</section>
<section>
<section>
<h2>Step #2: use appropriate algorithm</h2>
<ul>
<li>Consider and lower big O complexity
<img alt="Algorithmic complexity" style="width: 50%;" src="images/popt/Big-O-Time-Complexity-Chart.png"/>
</li>
<li>Choose data structures wisely</li>
<li>Look for optimized libraries</li>
<li>Find opportunities to scalarize & parallelize</li>
</ul>
</section>
<section>
<h2>Step #2: use appropriate algorithm</h2>
<p>Compilers are not aware of semantics of code, taking this into account <b>focus
on an algorithmic aspect first.</b></p>
<ul>
<li>Decrease big-O complexity</li>
<li>Use optimized libraries for subroutines</li>
<li>Restructure the code to use fewer resources</li>
<li>Split problem on subtasks, organize them wisely</li>
<li>Parallelize</li>
</ul>
<p>What if you need to sort 100 Mb of numerical data...</p>
<h3>What sorting algorithm would you choose?</h3>
</section>
</section>
<section>
<section>
<h2>Step #3: optimize memory accesses</h2>
<blockquote>You'll be surprised how many algorithms are memory bound!</blockquote>
<p>Optimization for memory usually involves:</p>
<dl>
<dt><b>Data restructuring</b></dt>
<dd>to load only data that is really needed for computations.</dd>
<dt><b>Data packaging</b></dt>
<dd>to shrink the data in size</dd>
<dt><b>Loop transformations</b></dt>
<dd>
<ul>
<li>to walk through the data in a more efficient way,</li>
<li>to increase temporal & spacial locality,</li>
<li>to perform cache-aware optimization</li>
</ul>
</dd>
</dl>
</section>
<section>
<h2>Step #3: optimize memory accesses</h2>
<p>Compilers are quite good at local optimization, such as</p>
<ul>
<li>loop bodies transformations,</li>
<li>local functions inlining,</li>
<li>arithmetic expressions simplification</li>
</ul>
<p>so <b>help a compiler rather than try to outfox it.</b></p>
<p>Work cohesively with it on</p>
<ul>
<li>enabling auto-vectorization,</li>
<li>optimizing critical loops,</li>
<li>vectorizing.</li>
</ul>
</section>
<section>
<h2>Step #3: optimize memory accesses</h2>
<pre><code class="cpp" style="font-size: 1.5em; line-height: 1.2em;">for (int j = 0; j < height; j++)
for (int i = 0; i < width; i++)
if (img[j * width + i] > 0)
count++;</code></pre>
<pre><code class="cpp" style="font-size: 1.5em; line-height: 1.2em;">for (int i = 0; i < width; i++)
for (int j = 0; j < height; j++)
if (img[j * width + i] > 0)
count++;</code></pre>
<h3>Which is more optimal for conventional CPU processor?</h3>
</section>
<section>
<h2>Step #3: optimize memory accesses</h2>
<pre style="border: 3px double #FF8D14;"><code class="cpp" style="font-size: 1.5em; line-height: 1.2em;">for (int j = 0; j < height; j++)
for (int i = 0; i < width; i++)
if (img[j * width + i] > 0)
count++;</code></pre>
<pre><code class="cpp" style="font-size: 1.5em; line-height: 1.2em;">for (int i = 0; i < width; i++)
for (int j = 0; j < height; j++)
if (img[j * width + i] > 0)
count++;</code></pre>
</section>
</section>
<section>
<section>
<h2>Step #4: minimize number of operations</h2>
<blockquote>Reducing a program in the number of operations<br>
doesn't necessarily decrease its runtime,<br>
but it's a good heuristic, though.</blockquote>
The compiler usually helps a lot here:
<table class="simple">
<colgroup>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<td style="width: 50%;">
<b>Machine-independent optimizations</b>
<ul>
<li>C<small style="vertical-align: bottom">ommon</small>
S<small style="vertical-align: bottom">ub-expression</small>
E<small style="vertical-align: bottom">limination</small></li>
<li>Constant propagation</li>
<li>Redundancy elimination</li>
<li>..</li>
</ul>
</td>
<td>
<b>Machine-dependent optimizations</b>
<ul>
<li>Register allocation</li>
<li>Instruction selectIon</li>
<li>Instruction scheduling</li>
<li>Peephole optimization</li>
<li>..</li>
</ul>
</td>
</tbody>
</table>
</section>
<section>
<h2>Step #4: minimize number of operations</h2>
<pre><code class="cpp">float pows(float a,float b,float c, float d, float e, float f, float x)
{
return
a * powf(x, 5.f) +
b * powf(x, 4.f) +
c * powf(x, 3.f) +
d * powf(x, 2.f) +
e * x + f;
}</code></pre>
<div class="console">gcc -march=armv7-a -mfpu=neon-vfpv4 -mthumb -mfloat-abi=softfp -O3 1.c -S -o 1.s</div>
</section>
<section>
<h2>Step #4: minimize number of operations</h2>
<table class="simple" style="width: 100%;">
<colgroup>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<td style="width: 50%;">
<pre><code class="armasm">pows:
push {r3, lr}
flds s17, [sp, #56]
fmsr s24, r1
movs r1, #0
fmsr s22, r0
movt r1, 16544
fmrs r0, s17
fmsr s21, r2
fmsr s20, r3
flds s19, [sp, #48]
flds s18, [sp, #52]
bl powf(PLT)
mov r1, #1082130432
fmsr s23, r0
fmrs r0, s17
bl powf(PLT)
</code></pre>
</td>
<td style="width: 50%;">
<pre><code class="armasm"> movs r1, #0
movt r1, 16448
fmsr s16, r0
fmrs r0, s17
bl powf(PLT)
fmuls s16, s16, s24
vfma.f32 s16, s23, s22
fmsr s15, r0
vfma.f32 s16, s15, s21
fmuls s15, s17, s17
vfma.f32 s16, s20, s15
vfma.f32 s16, s19, s17
fadds s15, s16, s18
fldmfdd sp!, {d8-d12}
fmrs r0, s15
pop {r3, pc}</code></pre>
</td>
</tr>
</tbody>
</table>
... Let's apply Horner rule.
</section>
<section>
<h2>Step #4: minimize number of operations</h2>
<pre><code class="cpp">float horner(float a, float b, float c, float d, float e, float f, float x)
{
return ((((a * x + b) * x + c) * x + d) * x + e) * x + f;
}</code></pre>
<pre><code class="armasm">horner:
flds s15, [sp, #8]
fmsr s11, r0
fmsr s12, r1
flds s14, [sp]
vfma.f32 s12, s11, s15
fmsr s11, r2
flds s13, [sp, #4]
vfma.f32 s11, s12, s15
fcpys s12, s11
fmsr s11, r3
vfma.f32 s11, s12, s15
vfma.f32 s14, s11, s15
vfma.f32 s13, s14, s15
fmrs r0, s13
bx lr</code></pre>
</section>
<section>
<h2>Step #4: minimize number of operations</h2>
<p>Unfortunately, sometimes a compiler fails some optimization steps (e.g. register allocation, scalarization)
and harms the performance by
introducing redundant operations.</p>
<blockquote><strong>Starting from this optimization step it is worth to <b>look at the assembly code</b> to check
whether the compiler is actually automating a particular optimization.</strong></blockquote>
</section>
</section>
<section>
<section>
<h2>Step #5: shrink the critical path</h2>
<blockquote><strong>Critical path</strong> is <b>the longest</b> sequence of operations in a code block
that must be completed <b>in order</b>, which is usually caused by dependencies between steps or operations.
</blockquote>
<ul>
<li>The critical path of a code block is hardly deducible from high-level code and requires assembly inspection.</li>
<li>Knowledge about architecture capabilities is required to estimate critical path more precisely.</li>
<li>Some profilers are able to do critical path analysis.</li>
<li>The term could also refer to the longest sequence of dependent steps in a pipeline that limits its parallelization.</li>
<li>Control-flow diagram is used to finding the critical path.</li>
</ul>
</section>
<section>
<h2>Step #5: shrink the critical path</h2>
<p>Let's look at the critical path of the following code block.</p>
<pre><code class="cpp">const uint8_t* p0 = src.ptr(row0);
const uint8_t* p1 = src.ptr(row1);
uint8_t* dptr = dst.ptr(row);
for (int col = 0; col < cols; ++col)
{
dptr[col] = (p0[col*2]+p0[col*2+1]
+ p1[col*2]+p1[col*2+1]+2)>>2;
}</code></pre>
<h3>What is the critical path of this code line?</h3>
</section>
<section>
<h2>Step #5: shrink the critical path</h2>
<p>Let's create 3-positional representation of the code block</p>
<pre><code class="cpp">r0 = col*2 // 1
r1 = r0+1 // 2
r2 = load(sptr0, r0) // 3
r3 = load(sptr0, r1) // 4
r4 = load(sptr1, r0) // 5
r5 = load(sptr1, r1) // 6
r6 = r2+r3 // 7
r7 = r6+r4 // 8
r8 = r7+r5 // 9
r9 = r8+2 // 10
r10 = shl(r9, 2) // 11</code></pre>
<h3>11 ?</h3>
<p>Let's construct the dependency graph...</p>
</section>
<section>
<h2>Step #5: shrink the critical path</h2>
<img alt="Critical path" style="width:70%;" class="simple" src="images/popt/path.svg"/>
<h3 style="margin-bottom: 0px;">8 ?</h3>
</section>
<section>
<h2>Step #5: shrink the critical path</h2>
But, the compiler reorders instructions <br> since integer math is associative
<img alt="Critical path" style="width:70%;" class="simple" src="images/popt/path2.svg"/>
<h3 style="margin-bottom: 0px;">6 ?</h3>
</section>
<section>
<h2>Step #5: shrink the critical path</h2>
And let's assume that hardware schedules<br> 1 arithmetic and 1 memory operation per clock.
<img alt="Critical path" style="width:48%;" class="simple" src="images/popt/path3.svg"/>
<h3 style="margin-bottom: 0px;">and back to 8 again</h3>
</section>
</section>
<section>
<section>
<h2>Step #6: do HW-specific optimization</h2>
<p>It requires comprehensive understanding of the target HW,<br/> which usually goes beyond compiler's abilities</p>
<ul>
<li>Using special hardware capabilities</li>
<li>Overcoming micro-architecture weakness</li>
<li>Using instructions, which are specific for concrete HW</li>
<li>balancing usage of different instruction types</li>
</ul>
<br/>
<p>A classical example here is a question of <strong>recomputing temporal v.s. getting it from the memory</strong>.</p>
</section>
<section>
<h2>Step #6: do HW-specific optimization</h2>
<p>Modern hardware is quite advanced,</p>
<ul>
<li>deep pipelines,</li>
<li>out-of-order execution,</li>
<li>sophisticated branch prediction,</li>
<li>multi-level memory hierarchies,</li>
<li>processor specialization.</li>
</ul><br>
<p>so <b>utilize unique properties of the hardware</b>.</p>
<p>Peephole optimization is not as important<br> as used to be 10 years ago.</p>
</section>
</section>
<section>
<h2>Step #7: dive into assembly</h2>
<blockquote><b>Assembler is a must-have to check the compiler</b><br>
but it is rarely used to write low-level code.</blockquote>
<strong>Raw assembly make sense to:</strong>
<ul>
<li><b>Overcome compiler bugs & optimization limitations</b>
<ul>
<li>addition of redundant instructions</li>
<li>suboptimal register allocation</li>
</ul>
</li>
<li><b>Use specific hardware features</b>
<ul>
<li>which are not expressed in higher level ISA</li>
</ul>
</li>
</ul>
<br>
<strong>Keep in mind that:</strong>
<ul>
<li>Assembly writing is the least portable optimization</li>
<li>In-line assembly limits compiler optimizations</li>
</ul>
</section>
<section>
<h2>How to learn optimization?</h2>
<blockquote><strong>Optimization is a <b>craft</b> rather than a <b>science</b></strong>.</blockquote>
<dl>
<dt>Practice more</dt>
<dd>Do not make practical knowledge too theoretical.</dd>
<dt>Look, what other people do</dt>
<dd>Do find real use cases of different optimization approaches and techniques.</dd>
<dt>Dig into an architecture</dt>
<dd><abbr title="Hardware">HW</abbr> evolves rapidly hence devices obsolete in a wink. <strong>Comprehensive
knowledge helps see beforehand</strong>.</dd>
</dl>
</section>
<section>
<section>
<h2>Recommended literature</h2>
<img alt="ter Architecture, Fifth Edition: A Quantitative Approach" style="width:27%" src="images/popt/hp.jpg">
<p>
<a href="http://www.amazon.com/Computer-Architecture-Fifth-Quantitative-Approach/dp/012383872X/ref=asap_bc?ie=UTF8">
Computer Architecture, Fifth Edition:<br> A Quantitative Approach</a><br/>by
<a href="http://www.computerhistory.org/fellowawards/hall/bios/John,Hennessy/">John L. Hennessy</a>
and
<a href="https://www.eecs.berkeley.edu/Faculty/Homepages/patterson.html">David A. Patterson.</a>
</p>
</section>
<section>
<h2>Recommended literature</h2>
<img alt="The Mature Optimization Handbook" src="images/popt/moh.jpg">
<p>
<a href="http://carlos.bueno.org/optimization/mature-optimization.pdf">The Mature Optimization Handbook</a>
by <a href="http://carlos.bueno.org/about.html">Carlos Bueno</a>
</p>
</section>
<section>
<h2>Recommended literature</h2>
<img alt="Is Parallel Programming Hard, And, If So, What Can You Do About It?" style="width:26%" src="images/popt/pm.jpg">
<p><a href="https://www.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook-1c.2015.01.31a.pdf">
Is Parallel Programming Hard, <br>And, If So, What Can You Do About It?</a><br/> by
<a href="http://www.rdrop.com/~paulmck/">Paul E. McKenney</a>
</p>
</section>
<section>
<h2>Recommended literature</h2>
<img alt="Engineering a Compiler" style="width:27%" src="images/popt/ec.jpg">
<p><a href="http://www.amazon.com/Engineering-Compiler-Second-Edition-Cooper/dp/012088478X">
Engineering a Compiler</a><br/> by
<a href="http://www.cs.rice.edu/~keith/">Keith Cooper</a> and <a href="http://www.cs.rice.edu/~linda/">Linda Torczon</a>
</p>
</section>
</section>
<section>
<h2>Summary</h2>
<ul>
<li>Practice, look what others do and dig into an architecture.</li>
<li>The main task of an optimizer is finding the critical part.</li>
<li>Optimizer's mastership is to know where to stop.</li>
<li>Knowledge about the code, the compiler and the platform is a must-have.</li>
<li>Optimization is a measure-analyze-optimize-check cycle.</li>
<li>Stick to the high-to-low approach.</li>
<li>Get the performance from algorithmic and data structure choices first,</li>
<li>... ensure memory access patterns next,</li>
<li>... then go deeper.</li>
</ul>
</section>
<section>
<h1>THE END</h1>
<img alt="The end" class="simple" src="images/popt/infinity.png">
<h4><a href="https://github.com/cuda-geek">Marina Kolpakova</a> / 2015-2016</h4>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: false,
slideNumber: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js' , async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>