Skip to content

Commit df2b457

Browse files
committed
update
1 parent a0353c6 commit df2b457

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

cppcon2025/images/generate_perf_charts.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
ax.spines['top'].set_visible(False)
1313
ax.spines['right'].set_visible(False)
1414

15-
for bar in bars:
15+
lang_labels = ["C++", "C++", "Rust", "C"]
16+
for i, bar in enumerate(bars):
1617
yval = bar.get_height()
1718
plt.text(bar.get_x() + bar.get_width()/2, yval + 50, f'{int(yval)} MB/s',
1819
ha='center', va='bottom', fontsize=12)
20+
plt.text(bar.get_x() + bar.get_width()/2, yval + 150, lang_labels[i],
21+
ha='center', va='bottom', fontsize=12, color='black', fontweight='bold', style='italic')
1922

2023
plt.ylabel('Throughput (MB/s)', fontsize=14)
2124
plt.ylim(0, 2500)
@@ -38,11 +41,14 @@
3841
ax.spines['top'].set_visible(False)
3942
ax.spines['right'].set_visible(False)
4043

44+
lang_labels = ["C++", "C++", "Rust", "C", "C++"]
4145
for i, bar in enumerate(bars):
4246
yval = bar.get_height()
4347
label = f'{yval} MB/s ⭐' if libraries_with[i] == 'simdjson' else f'{yval} MB/s'
4448
plt.text(bar.get_x() + bar.get_width()/2, yval + 50, label,
4549
ha='center', va='bottom', fontsize=12)
50+
plt.text(bar.get_x() + bar.get_width()/2, yval + 150, lang_labels[i],
51+
ha='center', va='bottom', fontsize=12, color='black', fontweight='bold', style='italic')
4652

4753
# Highlight simdjson
4854
bars[-1].set_linewidth(3)
@@ -69,11 +75,14 @@
6975
ax.spines['top'].set_visible(False)
7076
ax.spines['right'].set_visible(False)
7177

78+
lang_labels = ["C++", "C", "Rust", "C++", "C++"]
7279
for i, bar in enumerate(bars):
7380
yval = bar.get_height()
7481
label = f'{yval} MB/s ⭐' if libraries_sorted[i] == 'simdjson' else f'{yval} MB/s'
7582
plt.text(bar.get_x() + bar.get_width()/2, yval + 50, label,
7683
ha='center', va='bottom', fontsize=12)
84+
plt.text(bar.get_x() + bar.get_width()/2, yval + 150, lang_labels[i],
85+
ha='center', va='bottom', fontsize=12, color='black', fontweight='bold', style='italic')
7786

7887
# Highlight simdjson
7988
bars[0].set_linewidth(3)
8.56 KB
Loading
7.22 KB
Loading
8.48 KB
Loading

0 commit comments

Comments
 (0)