Skip to content

Commit ac28865

Browse files
committed
update
1 parent 45a750d commit ac28865

File tree

4 files changed

+97
-1
lines changed

4 files changed

+97
-1
lines changed

cppcon2025/cppcon_2025_slides.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ Source: Gwen (Chen) Shapira
104104

105105
---
106106

107+
![bg right](images/avx.jpeg)
108+
109+
107110
# SIMD Support in simdjson
108111

109112
* x64: SSSE3 (128-bit), AVX-2 (256-bit), AVX-512 (512-bit)
@@ -114,8 +117,11 @@ Source: Gwen (Chen) Shapira
114117

115118
---
116119

120+
![bg right 90%](images/simdjsondesign.png)
121+
117122
# simdjson: Design
118123

124+
119125
* First scan identifies the structural characters, start of all strings at about 10 GB/s using SIMD instructions.
120126
* Validates Unicode (UTF-8) at 30 GB/s.
121127
* Rest of parsing relies on the generated index.
@@ -208,6 +214,7 @@ for (auto item : arr) {
208214

209215
---
210216

217+
211218
# When Your Game Grows...
212219

213220
```cpp
@@ -229,9 +236,14 @@ struct Player {
229236
};
230237
```
231238
239+
232240
---
233241
234-
<img src="images/happy_programmer.jpg">
242+
# Happy programmer...
243+
244+
245+
![bg right](images/happy_programmer.jpg)
246+
235247
236248
---
237249

cppcon2025/images/avx.jpeg

92.1 KB
Loading
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Styled JSON Display</title>
7+
<style>
8+
body {
9+
font-family: 'Arial', sans-serif;
10+
background-color: #f4f4f9;
11+
display: flex;
12+
justify-content: center;
13+
align-items: center;
14+
min-height: 100vh;
15+
margin: 0;
16+
padding: 20px;
17+
}
18+
pre {
19+
background-color: #ffffff;
20+
border-radius: 12px;
21+
padding: 20px;
22+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
23+
max-width: 600px;
24+
width: 100%;
25+
font-size: 16px;
26+
line-height: 1.5;
27+
overflow-x: auto;
28+
border: 1px solid #e0e0e0;
29+
}
30+
.json-key {
31+
color: #2c3e50;
32+
font-weight: bold;
33+
text-decoration: underline;
34+
}
35+
.json-string {
36+
color: #e74c3c;
37+
}
38+
.json-number {
39+
color: #2980b9;
40+
}
41+
.json-bracket {
42+
color: #8e44ad;
43+
font-weight: bold;
44+
text-decoration: underline;
45+
}
46+
.boxed {
47+
border: 1px solid #333;
48+
padding: 1px 3px;
49+
border-radius: 3px;
50+
display: inline-block;
51+
line-height: 1;
52+
}
53+
54+
.string-start {
55+
position: relative;
56+
}
57+
.number-start::before {
58+
content: attr(data-first-digit);
59+
border: 1px solid #333;
60+
padding: 1px 3px;
61+
border-radius: 3px;
62+
display: inline-block;
63+
line-height: 1;
64+
}
65+
.number-start {
66+
position: relative;
67+
}
68+
</style>
69+
</head>
70+
<body>
71+
<pre>
72+
<span class="json-bracket boxed">{</span>
73+
<span class="json-key"><span class="boxed json-string">"</span>nom"</span><span class="boxed">:</span> <span class="string-start json-string"><span class="boxed json-string">"</span>Marie Dubois"</span><span class="boxed">,</span>
74+
<span class="json-key"><span class="boxed json-string">"</span>age"</span><span class="boxed">:</span> <span class="json-number number-start" data-first-digit="2">28</span><span class="boxed">,</span>
75+
<span class="json-key"><span class="boxed json-string">"</span>ville"</span><span class="boxed">:</span> <span class="string-start json-string"><span class="boxed json-string">"</span>Paris"</span><span class="boxed">,</span>
76+
<span class="json-key"><span class="boxed json-string">"</span>loisirs"</span><span class="boxed">:</span> <span class="json-bracket boxed">[</span><span class="string-start json-string"><span class="boxed json-string">"</span>lecture"</span><span class="boxed">,</span> <span class="string-start json-string"><span class="boxed json-string">"</span>voyage"</span><span class="boxed">,</span> <span class="string-start json-string"><span class="boxed json-string">"</span>yoga"</span><span class="json-bracket boxed">]</span><span class="boxed">,</span>
77+
<span class="json-key"><span class="boxed json-string">"</span>contact"</span><span class="boxed">:</span> <span class="json-bracket boxed">{</span>
78+
<span class="json-key"><span class="boxed json-string">"</span>email"</span><span class="boxed">:</span> <span class="string-start json-string"><span class="boxed json-string">"</span>[email protected]"</span><span class="boxed">,</span>
79+
<span class="json-key"><span class="boxed json-string">"</span>phone"</span><span class="boxed">:</span> <span class="string-start json-string"><span class="boxed json-string">"</span>+33123456789"</span>
80+
<span class="json-bracket boxed">}</span>
81+
<span class="json-bracket boxed">}</span>
82+
</pre>
83+
</body>
84+
</html>
97.5 KB
Loading

0 commit comments

Comments
 (0)