@@ -62,58 +62,70 @@ public string GetValue(Summary summary, BenchmarkCase benchmarkCase)
6262 [ Config ( typeof ( Config ) ) ]
6363 public class RealDataBenchmark
6464 {
65+ // We only informs the user once about the SIMD support of the system.
66+ private static bool printed ;
6567#pragma warning disable CA1812
6668 private sealed class Config : ManualConfig
6769 {
6870 public Config ( )
6971 {
7072 AddColumn ( new Speed ( ) ) ;
7173
72-
7374 if ( RuntimeInformation . ProcessArchitecture == Architecture . Arm64 )
7475 {
76+ if ( ! printed )
77+ {
7578#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+ }
7982 }
8083 else if ( RuntimeInformation . ProcessArchitecture == Architecture . X64 )
8184 {
8285 if ( Vector512 . IsHardwareAccelerated && System . Runtime . Intrinsics . X86 . Avx512Vbmi . IsSupported )
8386 {
87+ if ( ! printed )
88+ {
8489#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+ }
8793 }
8894 else if ( Avx2 . IsSupported )
8995 {
96+ if ( ! printed )
97+ {
9098#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+ }
93102 }
94103 else if ( Ssse3 . IsSupported )
95104 {
105+ if ( ! printed )
106+ {
96107#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+ }
99111 }
100112 else
101113 {
114+ if ( ! printed )
115+ {
102116#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+ }
105120 }
106121 }
107- else
108- {
109- AddFilter ( new AnyCategoriesFilter ( [ "scalar" , "runtime" ] ) ) ;
110-
111- }
122+ AddFilter ( new AnyCategoriesFilter ( [ "default" ] ) ) ;
112123
113124 }
114125 }
115126 // Parameters and variables for real data
116- [ Params ( @"data/Arabic-Lipsum.utf8.txt" ,
127+ [ Params ( @"data/twitter.json" ,
128+ @"data/Arabic-Lipsum.utf8.txt" ,
117129 @"data/Hebrew-Lipsum.utf8.txt" ,
118130 @"data/Korean-Lipsum.utf8.txt" ,
119131 @"data/Chinese-Lipsum.utf8.txt" ,
@@ -285,7 +297,6 @@ public unsafe void SIMDUtf8ValidationRealDataSse()
285297 } ) ;
286298 }
287299 }
288-
289300 }
290301 public class Program
291302 {
0 commit comments