@@ -62,58 +62,70 @@ public string GetValue(Summary summary, BenchmarkCase benchmarkCase)
62
62
[ Config ( typeof ( Config ) ) ]
63
63
public class RealDataBenchmark
64
64
{
65
+ // We only informs the user once about the SIMD support of the system.
66
+ private static bool printed ;
65
67
#pragma warning disable CA1812
66
68
private sealed class Config : ManualConfig
67
69
{
68
70
public Config ( )
69
71
{
70
72
AddColumn ( new Speed ( ) ) ;
71
73
72
-
73
74
if ( RuntimeInformation . ProcessArchitecture == Architecture . Arm64 )
74
75
{
76
+ if ( ! printed )
77
+ {
75
78
#pragma warning disable CA1303
76
- Console . WriteLine ( "ARM64 system detected." ) ;
77
- AddFilter ( new AnyCategoriesFilter ( [ "arm64" , "scalar" , "runtime" ] ) ) ;
78
-
79
+ Console . WriteLine ( "ARM64 system detected." ) ;
80
+ printed = true ;
81
+ }
79
82
}
80
83
else if ( RuntimeInformation . ProcessArchitecture == Architecture . X64 )
81
84
{
82
85
if ( Vector512 . IsHardwareAccelerated && System . Runtime . Intrinsics . X86 . Avx512Vbmi . IsSupported )
83
86
{
87
+ if ( ! printed )
88
+ {
84
89
#pragma warning disable CA1303
85
- Console . WriteLine ( "X64 system detected (Intel, AMD,...) with AVX-512 support." ) ;
86
- AddFilter ( new AnyCategoriesFilter ( [ "avx512" , "avx" , "sse" , "scalar" , "runtime" ] ) ) ;
90
+ Console . WriteLine ( "X64 system detected (Intel, AMD,...) with AVX-512 support." ) ;
91
+ printed = true ;
92
+ }
87
93
}
88
94
else if ( Avx2 . IsSupported )
89
95
{
96
+ if ( ! printed )
97
+ {
90
98
#pragma warning disable CA1303
91
- Console . WriteLine ( "X64 system detected (Intel, AMD,...) with AVX2 support." ) ;
92
- AddFilter ( new AnyCategoriesFilter ( [ "avx" , "sse" , "scalar" , "runtime" ] ) ) ;
99
+ Console . WriteLine ( "X64 system detected (Intel, AMD,...) with AVX2 support." ) ;
100
+ printed = true ;
101
+ }
93
102
}
94
103
else if ( Ssse3 . IsSupported )
95
104
{
105
+ if ( ! printed )
106
+ {
96
107
#pragma warning disable CA1303
97
- Console . WriteLine ( "X64 system detected (Intel, AMD,...) with Sse4.2 support." ) ;
98
- AddFilter ( new AnyCategoriesFilter ( [ "sse" , "scalar" , "runtime" ] ) ) ;
108
+ Console . WriteLine ( "X64 system detected (Intel, AMD,...) with Sse4.2 support." ) ;
109
+ printed = true ;
110
+ }
99
111
}
100
112
else
101
113
{
114
+ if ( ! printed )
115
+ {
102
116
#pragma warning disable CA1303
103
- Console . WriteLine ( "X64 system detected (Intel, AMD,...) without relevant SIMD support." ) ;
104
- AddFilter ( new AnyCategoriesFilter ( [ "scalar" , "runtime" ] ) ) ;
117
+ Console . WriteLine ( "X64 system detected (Intel, AMD,...) without relevant SIMD support." ) ;
118
+ printed = true ;
119
+ }
105
120
}
106
121
}
107
- else
108
- {
109
- AddFilter ( new AnyCategoriesFilter ( [ "scalar" , "runtime" ] ) ) ;
110
-
111
- }
122
+ AddFilter ( new AnyCategoriesFilter ( [ "default" ] ) ) ;
112
123
113
124
}
114
125
}
115
126
// Parameters and variables for real data
116
- [ Params ( @"data/Arabic-Lipsum.utf8.txt" ,
127
+ [ Params ( @"data/twitter.json" ,
128
+ @"data/Arabic-Lipsum.utf8.txt" ,
117
129
@"data/Hebrew-Lipsum.utf8.txt" ,
118
130
@"data/Korean-Lipsum.utf8.txt" ,
119
131
@"data/Chinese-Lipsum.utf8.txt" ,
@@ -285,7 +297,6 @@ public unsafe void SIMDUtf8ValidationRealDataSse()
285
297
} ) ;
286
298
}
287
299
}
288
-
289
300
}
290
301
public class Program
291
302
{
0 commit comments