Skip to content

Commit

Permalink
preparing release
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lemire committed Jun 19, 2024
1 parent 5f6f669 commit 261102f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand All @@ -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
Expand Down
24 changes: 6 additions & 18 deletions benchmark/Benchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]));

}
}
Expand Down Expand Up @@ -292,7 +281,6 @@ public unsafe void SIMDUtf8ValidationRealDataSse()
});
}
}

}
public class Program
{
Expand Down

0 comments on commit 261102f

Please sign in to comment.