Skip to content

Commit 81c80d5

Browse files
committed
Add x64 performance to the docs
1 parent 89e1dd0 commit 81c80d5

File tree

1 file changed

+161
-0
lines changed

1 file changed

+161
-0
lines changed

doc/decimal/benchmarks.adoc

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,38 @@ An example on Linux with b2: `../../../b2 cxxstd=20 toolset=gcc-13 define=BOOST_
2525
The benchmark for comparisons generates a random vector containing 2,000,000 elements and does operations `>`, `>=`, `<`, `\<=`, `==`, and `!=` between `vec[i] and vec[i + 1]`.
2626
This is repeated 5 times to generate stable results.
2727

28+
=== x64 Linux Results
29+
30+
Run using an Intel i9-11900k chipset running RHEL 9.4 and GCC 11.4.1-3
31+
32+
|===
33+
| Type | Runtime (us) | Ratio to `double`
34+
| `float`
35+
| 35,581
36+
| 0.604
37+
| `double`
38+
| 58,848
39+
| 1.000
40+
| `decimal32`
41+
| 2,410,084
42+
| 40.954
43+
| `decimal64`
44+
| 4,233,175
45+
| 71.934
46+
| `decimal128`
47+
| 6,337,447
48+
| 107.692
49+
| `decimal32_fast`
50+
| 628,241
51+
| 10.676
52+
| `decimal64_fast`
53+
| 724,474
54+
| 12.311
55+
| `decimal128_fast`
56+
| 517,930
57+
| 8.801
58+
|===
59+
2860
=== M1 macOS Results
2961

3062
Run using a Macbook pro with M1 pro chipset running macOS Sonoma 14.4.1 and homebrew Clang 18.1.4
@@ -62,6 +94,130 @@ Run using a Macbook pro with M1 pro chipset running macOS Sonoma 14.4.1 and home
6294
The benchmark for these operations generates a random vector containing 2,000,000 elements and does operations `+`, `-`, `*`, `/` between `vec[i] and vec[i + 1]`.
6395
This is repeated 5 times to generate stable results.
6496

97+
=== x64 Linux Results
98+
99+
Run using an Intel i9-11900k chipset running RHEL 9.4 and GCC 11.4.1-3
100+
101+
==== Addition
102+
103+
|===
104+
| Type | Runtime (us) | Ratio to `double`
105+
| `float`
106+
| 54,566
107+
| 1.077
108+
| `double`
109+
| 50,640
110+
| 1.000
111+
| `decimal32`
112+
| 3,639,957
113+
| 71.879
114+
| `decimal64`
115+
| 4,172,318
116+
| 82.392
117+
| `decimal128`
118+
| 10,936,595
119+
| 215.968
120+
| `decimal32_fast`
121+
| 1,148,249
122+
| 22.675
123+
| `decimal64_fast`
124+
| 1,149,203
125+
| 22.694
126+
| `decimal128_fast`
127+
| 7,424,598
128+
| 146.615
129+
|===
130+
131+
==== Subtraction
132+
133+
|===
134+
| Type | Runtime (us) | Ratio to `double`
135+
| `float`
136+
| 48,654
137+
| 0.912
138+
| `double`
139+
| 53,348
140+
| 1.000
141+
| `decimal32`
142+
| 2,850,709
143+
| 53.436
144+
| `decimal64`
145+
| 3,493,936
146+
| 65.493
147+
| `decimal128`
148+
| 10,492,728
149+
| 196.685
150+
| `decimal32_fast`
151+
| 1,012,199
152+
| 18.974
153+
| `decimal64_fast`
154+
| 1,055,476
155+
| 19.785
156+
| `decimal128_fast`
157+
| 2,114,185
158+
| 39.630
159+
|===
160+
161+
==== Multiplication
162+
163+
|===
164+
| Type | Runtime (us) | Ratio to `double`
165+
| `float`
166+
| 53,405
167+
| 1.101
168+
| `double`
169+
| 48,497
170+
| 1.000
171+
| `decimal32`
172+
| 2,708,779
173+
| 55.855
174+
| `decimal64`
175+
| 2,761,465
176+
| 56.941
177+
| `decimal128`
178+
| 8,509,678
179+
| 175.468
180+
| `decimal32_fast`
181+
| 451,679
182+
| 9.313
183+
| `decimal64_fast`
184+
| 777,927
185+
| 16.041
186+
| `decimal128_fast`
187+
| 13,970,509
188+
| 288.070
189+
|===
190+
191+
==== Division
192+
193+
|===
194+
| Type | Runtime (us) | Ratio to `double`
195+
| `float`
196+
| 58,955
197+
| 0.755
198+
| `double`
199+
| 78,046
200+
| 1.000
201+
| `decimal32`
202+
| 2,907,134
203+
| 37.249
204+
| `decimal64`
205+
| 3,464,841
206+
| 44.394
207+
| `decimal128`
208+
| 18,202,742
209+
| 233.231
210+
| `decimal32_fast`
211+
| 1,092,346
212+
| 13.996
213+
| `decimal64_fast`
214+
| 1,207,648
215+
| 15.474
216+
| `decimal128_fast`
217+
| 1,208,184
218+
| 15.480
219+
|===
220+
65221
=== M1 macOS Results
66222

67223
Run using a Macbook pro with M1 pro chipset running macOS Sonoma 14.4.1 and homebrew Clang 18.1.4
@@ -186,6 +342,9 @@ Run using a Macbook pro with M1 pro chipset running macOS Sonoma 14.4.1 and home
186342
| 77.956
187343
|===
188344

345+
////
346+
These are not available for the built-ins so not deleting but also not incorporating
347+
189348
== Selected Special Functions
190349
191350
The benchmark for these operations generates a random vector containing 2,000,000 elements and does operations `+`, `-`, `*`, `/` between `vec[i] and vec[i + 1]`.
@@ -377,3 +536,5 @@ Run using a Macbook pro with M1 pro chipset running macOS Sonoma 14.4.1 and home
377536
| 3,108,380
378537
| 9.724
379538
|===
539+
540+
////

0 commit comments

Comments
 (0)