Skip to content

Commit 65276c1

Browse files
author
Matt Godbolt
committed
Add goal; print stuff
1 parent 7ed33e8 commit 65276c1

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

Notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 18 Sep notes/TODO
2+
* Photos/images on slides
3+
* Hellige suggests "How do people use it"
4+
* e.g. John Zwinck's bug report, how many GCC/Clang bugs refer to it?
5+
* Consider dropping devirtualise (after Geek Lunch), just too much to go in to
6+
17
# v3.3 notes (7 sep)
28
* 1hr 17
39
* didn't do devirt as much

compiler-explorer.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,13 @@
5959

6060
let parent = element.parentElement;
6161

62+
const isPdf = !!window.location.search.match(/print-pdf/gi);
63+
const baseUrl = isPdf ? 'https://gcc.godbolt.org/#' : 'http://localhost:10240/#';
64+
6265
if (parent.tagName === "PRE") {
6366
let a = document.createElement('a');
64-
a.setAttribute('href', 'http://localhost:10240/#' + ceFragment);
67+
68+
a.setAttribute('href', baseUrl + ceFragment);
6569
a.setAttribute('target', '_blank');
6670
a.setAttribute('class', 'view-button');
6771
a.textContent = 'View';
@@ -74,13 +78,17 @@
7478
ceElement.setAttribute('height', '300px');
7579
parent.appendChild(ceElement);
7680

77-
let embedUrl = "http://localhost:10240/e#" + ceFragment;
78-
Reveal.addEventListener('slidechanged', (e) => {
79-
if (e.currentSlide.contains(ceElement)) {
80-
ceElement.setAttribute('src', embedUrl);
81-
Reveal.sync();
82-
}
83-
});
81+
let embedUrl = baseUrl + ceFragment;
82+
if (isPdf) {
83+
ceElement.setAttribute('src', embedUrl);
84+
} else {
85+
Reveal.addEventListener('slidechanged', (e) => {
86+
if (e.currentSlide.contains(ceElement)) {
87+
ceElement.setAttribute('src', embedUrl);
88+
Reveal.sync();
89+
}
90+
});
91+
}
8492
}
8593
}
8694
})();

images/goal.jpg

965 KB
Loading

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@
122122
</head>
123123
<body>
124124
<div class="reveal">
125-
<!-- TODO compile all with -Wall -Wextra -->
126-
<!-- TODO check font size (26) -->
127125
<section class="slides">
128126
<section id="title">
129127
<h2>What Has My Compiler Done for Me Lately?</h2>
@@ -217,6 +215,8 @@ <h3>WARNING</h3>
217215
<ul>
218216
<li>Reading assembly alone can be misleading</li>
219217
<li><em>Always</em> measure too</li>
218+
<li>Google Benchmark</li>
219+
<li><a href="http://www.quick-bench.com/">quick-bench.com</a></li>
220220
</ul>
221221
<aside class="notes">
222222
Shout out to google benchmarking tool. Microbenchmarks, perils.

0 commit comments

Comments
 (0)