blob: 9aad6488aa2cb401fdb72a8dc93dd8afb3610e66 (
plain)
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
|
# benchmark2.cpp results
## VS 2017 15.9.7 64 bit (cl.exe 19.16, /EHsc /std:c++17)
### /Od
#### Compile time
```
variant2 (-DONLY_V2): 1403 ms
boost::variant (-DONLY_BV): 2972 ms
std::variant (-DONLY_SV): 1057 ms
```
#### Run time
```
N=100000000:
prefix: 7016 ms; S=416666583333336
variant2: 24723 ms; S=416666583333336
boost::variant: 60438 ms; S=416666583333336
std::variant: 20707 ms; S=416666583333336
```
### /O2 /DNDEBUG
#### Compile time
```
variant2 (-DONLY_V2): 1778 ms
boost::variant (-DONLY_BV): 3252 ms
std::variant (-DONLY_SV): 1372 ms
```
#### Run time
```
N=100000000:
prefix: 803 ms; S=416666583333336
variant2: 2124 ms; S=416666583333336
boost::variant: 6191 ms; S=416666583333336
std::variant: 2193 ms; S=416666583333336
```
## g++ 7.4.0 -std=c++17 (Cygwin 64 bit)
### -O0
#### Compile time
```
variant2 (-DONLY_V2): 1739 ms
boost::variant (-DONLY_BV): 3113 ms
std::variant (-DONLY_SV): 1719 ms
```
#### Run time
```
N=100000000:
prefix: 5163 ms; S=416666583333336
variant2: 20628 ms; S=416666583333336
boost::variant: 43308 ms; S=416666583333336
std::variant: 42375 ms; S=416666583333336
```
### -O1
#### Compile time
```
variant2 (-DONLY_V2): 1484 ms
boost::variant (-DONLY_BV): 2947 ms
std::variant (-DONLY_SV): 1448 ms
```
#### Run time
```
N=100000000:
prefix: 781 ms; S=416666583333336
variant2: 1992 ms; S=416666583333336
boost::variant: 2249 ms; S=416666583333336
std::variant: 4843 ms; S=416666583333336
```
### -O2 -DNDEBUG
#### Compile time
```
variant2 (-DONLY_V2): 1547 ms
boost::variant (-DONLY_BV): 2999 ms
std::variant (-DONLY_SV): 1528 ms
```
#### Run time
```
N=100000000:
prefix: 793 ms; S=416666583333336
variant2: 1686 ms; S=416666583333336
boost::variant: 1833 ms; S=416666583333336
std::variant: 4340 ms; S=416666583333336
```
### -O3 -DNDEBUG
#### Compile time
```
variant2 (-DONLY_V2): 1595 ms
boost::variant (-DONLY_BV): 3084 ms
std::variant (-DONLY_SV): 1620 ms
```
#### Run time
```
N=100000000:
prefix: 853 ms; S=416666583333336
variant2: 1681 ms; S=416666583333336
boost::variant: 1773 ms; S=416666583333336
std::variant: 3989 ms; S=416666583333336
```
## clang++ 5.0.1 -std=c++17 -stdlib=libc++ (Cygwin 64 bit)
### -O0
#### Compile time
```
variant2 (-DONLY_V2): 1578 ms
boost::variant (-DONLY_BV): 2623 ms
std::variant (-DONLY_SV): 1508 ms
```
#### Run time
```
N=100000000:
prefix: 4447 ms; S=416666583333336
variant2: 16016 ms; S=416666583333336
boost::variant: 42365 ms; S=416666583333336
std::variant: 17817 ms; S=416666583333336
```
### -O1
#### Compile time
```
variant2 (-DONLY_V2): 1841 ms
boost::variant (-DONLY_BV): 2919 ms
std::variant (-DONLY_SV): 1776 ms
```
#### Run time
```
N=100000000:
prefix: 1390 ms; S=416666583333336
variant2: 5397 ms; S=416666583333336
boost::variant: 23234 ms; S=416666583333336
std::variant: 2807 ms; S=416666583333336
```
### -O2 -DNDEBUG
#### Compile time
```
variant2 (-DONLY_V2): 1766 ms
boost::variant (-DONLY_BV): 2817 ms
std::variant (-DONLY_SV): 1718 ms
```
#### Run time
```
N=100000000:
prefix: 604 ms; S=416666583333336
variant2: 1625 ms; S=416666583333336
boost::variant: 2735 ms; S=416666583333336
std::variant: 2664 ms; S=416666583333336
```
### -O3 -DNDEBUG
#### Compile time
```
variant2 (-DONLY_V2): 1720 ms
boost::variant (-DONLY_BV): 2806 ms
std::variant (-DONLY_SV): 1737 ms
```
#### Run time
```
N=100000000:
prefix: 603 ms; S=416666583333336
variant2: 1608 ms; S=416666583333336
boost::variant: 2696 ms; S=416666583333336
std::variant: 2668 ms; S=416666583333336
```
|