From 261102fcb72b817681f6838345212453c8a92d0e Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 19 Jun 2024 17:27:18 -0400 Subject: [PATCH] preparing release --- README.md | 9 +++++---- benchmark/Benchmark.cs | 24 ++++++------------------ 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index d21c165..123470d 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ To run just one benchmark, use a filter: ``` cd benchmark dotnet run --configuration Release --filter "*Twitter*" -dotnet run --configuration Release --filter "*Arabic-Lipsum*" +dotnet run --configuration Release --filter "*Lipsum*" ``` If you are under macOS or Linux, you may want to run the benchmarks in privileged mode: @@ -101,9 +101,6 @@ sudo dotnet run -c Release ## Results (x64) -On x64 system, we offer several functions: a fallback function for legacy systems, -a SSE42 function for older CPUs, and an AVX2 function for current x64 systems. - On an Intel Ice Lake system, our validation function is up to seven times faster than the standard library. A realistic input is Twitter.json which is mostly ASCII with some Unicode content. @@ -124,6 +121,10 @@ A realistic input is Twitter.json which is mostly ASCII with some Unicode conten On the pure ASCII inputs (Latin-Lipsum) has a small advantage but both functions are extremely fast. + +On x64 system, we offer several functions: a fallback function for legacy systems, +a SSE42 function for older CPUs, and an AVX2 function for current x64 systems. + ## Results (ARM) On an Apple M2 system, our validation function is two to three times diff --git a/benchmark/Benchmark.cs b/benchmark/Benchmark.cs index f5552ee..c5e880e 100644 --- a/benchmark/Benchmark.cs +++ b/benchmark/Benchmark.cs @@ -71,66 +71,55 @@ public Config() { AddColumn(new Speed()); - if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64) { - if (!printed) + if (!printed) { #pragma warning disable CA1303 Console.WriteLine("ARM64 system detected."); printed = true; } - AddFilter(new AnyCategoriesFilter(["arm64", "scalar", "runtime"])); - } else if (RuntimeInformation.ProcessArchitecture == Architecture.X64) { if (Vector512.IsHardwareAccelerated && System.Runtime.Intrinsics.X86.Avx512Vbmi.IsSupported) { - if (!printed) + if (!printed) { #pragma warning disable CA1303 Console.WriteLine("X64 system detected (Intel, AMD,...) with AVX-512 support."); printed = true; } - AddFilter(new AnyCategoriesFilter(["avx512", "avx", "sse", "scalar", "runtime"])); } else if (Avx2.IsSupported) { - if (!printed) + if (!printed) { #pragma warning disable CA1303 Console.WriteLine("X64 system detected (Intel, AMD,...) with AVX2 support."); printed = true; } - AddFilter(new AnyCategoriesFilter(["avx", "sse", "scalar", "runtime"])); } else if (Ssse3.IsSupported) { - if (!printed) + if (!printed) { #pragma warning disable CA1303 Console.WriteLine("X64 system detected (Intel, AMD,...) with Sse4.2 support."); printed = true; } - AddFilter(new AnyCategoriesFilter(["sse", "scalar", "runtime"])); } else { - if (!printed) + if (!printed) { #pragma warning disable CA1303 Console.WriteLine("X64 system detected (Intel, AMD,...) without relevant SIMD support."); printed = true; } - AddFilter(new AnyCategoriesFilter(["scalar", "runtime"])); } } - else - { - AddFilter(new AnyCategoriesFilter(["scalar", "runtime"])); - - } + AddFilter(new AnyCategoriesFilter(["default"])); } } @@ -292,7 +281,6 @@ public unsafe void SIMDUtf8ValidationRealDataSse() }); } } - } public class Program {