Open
Description
Run Information
Name | Value |
---|---|
Architecture | arm64 |
OS | ubuntu 22.04 |
Queue | AmpereUbuntu |
Baseline | d06c2f6ec8228addc77cb7b7856c3fe07c3d1f02 |
Compare | 2db28217c40088686fcc8ccc52df2da0391bb712 |
Diff | Diff |
Configs | CompilationMode:tiered, LLVM:false, MonoAOT:false, MonoInterpreter:true, RunKind:micro_mono |
Improvements in System.Numerics.Tests.Perf_BigInteger
Benchmark | Baseline | Test | Test/Base | Test Quality | Edge Detector | Baseline IR | Compare IR | IR Ratio |
---|---|---|---|---|---|---|---|---|
85.43 ns | 75.03 ns | 0.88 | 0.11 | False | ||||
548.50 ns | 353.91 ns | 0.65 | 0.13 | False | ||||
231.01 ns | 166.03 ns | 0.72 | 0.11 | False | ||||
257.92 ns | 191.47 ns | 0.74 | 0.05 | False | ||||
854.03 ns | 733.53 ns | 0.86 | 0.08 | False | ||||
295.27 ns | 227.92 ns | 0.77 | 0.07 | False | ||||
77.38 μs | 51.91 μs | 0.67 | 0.20 | False | ||||
499.06 ns | 363.19 ns | 0.73 | 0.38 | False | ||||
133.35 ns | 107.16 ns | 0.80 | 0.19 | False | ||||
38.98 μs | 34.15 μs | 0.88 | 0.07 | False | ||||
1.05 μs | 886.50 ns | 0.84 | 0.05 | False | ||||
77.17 μs | 51.70 μs | 0.67 | 0.12 | False | ||||
143.07 ms | 115.97 ms | 0.81 | 0.09 | False | ||||
183.67 ns | 131.01 ns | 0.71 | 0.35 | False | ||||
34.92 ms | 31.04 ms | 0.89 | 0.05 | False | ||||
1.71 μs | 1.23 μs | 0.71 | 0.13 | False | ||||
100.97 μs | 81.46 μs | 0.81 | 0.07 | False | ||||
216.83 ns | 168.12 ns | 0.78 | 0.06 | False | ||||
86.28 ns | 76.38 ns | 0.89 | 0.14 | False | ||||
1.75 μs | 1.26 μs | 0.72 | 0.11 | False | ||||
32.71 ms | 28.56 ms | 0.87 | 0.07 | False | ||||
91.50 ns | 78.32 ns | 0.86 | 0.19 | False | ||||
21.64 μs | 17.38 μs | 0.80 | 0.20 | False |
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Repro Steps
Prerequisites (Build files either built locally or downloaded from payload above)
- Libraries build extracted to
runtime/artifacts
or build instructions: Libraries README args:-subset libs+libs.tests -rc release -configuration Release -arch $RunArch -framework net8.0
- CoreCLR product build extracted to
runtime/artifacts/bin/coreclr/$RunOS.$RunArch.Release
, build instructions: CoreCLR README args:-subset clr+libs -rc release -configuration Release -arch $RunArch -framework net8.0
- Mono Runtime build extracted to
runtime/artifacts/bin/mono/$RunOS.$RunArch.Release
, build instructions: MONO README args:-arch $RunArch -os $RunOS -s mono+libs+host+packs -c Release
- Dotnet SDK installed for dotnet commands
- Running commands from the runtime folder
Linux
# Set $RunDir to the runtime directory
RunDir=`pwd`
# Set the OS, arch, and OSId
RunOS='linux'
RunOSId='linux'
RunArch='x64'
# Create mono dotnet
mkdir -p $RunDir/artifacts/dotnet-mono
$RunDir/build.sh -subset libs.pretest -configuration release -ci -arch $RunArch -testscope innerloop /p:RuntimeArtifactsPath=$RunDir/artifacts/bin/mono/$RunOS.$RunArch.Release /p:RuntimeFlavor=mono
cp $RunDir/artifacts/bin/runtime/net8.0-$RunOS-Release-$RunArch/* $RunDir/artifacts/bin/testhost/net8.0-$RunOS-Release-$RunArch/shared/Microsoft.NETCore.App/8.0.0 -rf
cp $RunDir/artifacts/bin/testhost/net8.0-$RunOS-Release-$RunArch/* $RunDir/artifacts/dotnet-mono -r
cp $RunDir/artifacts/bin/coreclr/$RunOS.$RunArch.Release/corerun $RunDir/artifacts/dotnet-mono/shared/Microsoft.NETCore.App/8.0.0/corerun
# Create Core Root
$RunDir/src/tests/build.sh release $RunArch generatelayoutonly /p:LibrariesConfiguration=Release
# Clone performance
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $RunDir/performance
# Use Interpreter
export MONO_ENV_OPTIONS="--interpreter"
# One line run:
python3 $RunDir/performance/scripts/benchmarks_ci.py --csproj $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --incremental no --architecture $RunArch -f net8.0 --filter 'System.Numerics.Tests.Perf_BigInteger*' --bdn-artifacts $RunDir/artifacts/BenchmarkDotNet.Artifacts --bdn-arguments="--anyCategories Libraries Runtime --category-exclusion-filter NoInterpreter NoMono --logBuildOutput --generateBinLog --corerun $RunDir/artifacts/dotnet-mono/shared/Microsoft.NETCore.App/8.0.0/corerun"
# Individual Commands:
# Restore
dotnet restore $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --packages $RunDir/performance/artifacts/packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1
# Build
dotnet build $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore /p:NuGetPackageRoot=$RunDir/performance/artifacts/packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1
# Run
dotnet run --project $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore --no-build -- --filter 'System.Numerics.Tests.Perf_BigInteger*' --anyCategories Libraries Runtime " --category-exclusion-filter NoInterpreter NoMono --logBuildOutput --generateBinLog --corerun $RunDir/artifacts/dotnet-mono/shared/Microsoft.NETCore.App/8.0.0/corerun --artifacts $RunDir/artifacts/BenchmarkDotNet.Artifacts --packages $RunDir/performance/artifacts/packages
Windows
# Set $RunDir to the runtime directory
$RunDir="FullPathHere"
# Set the OS, arch, and OSId
RunOS='windows'
RunOSId='win'
RunArch='x64'
# Create mono dotnet
mkdir -p $RunDir/artifacts/dotnet-mono
$RunDir/build.sh -subset libs.pretest -configuration release -ci -arch $RunArch -testscope innerloop /p:RuntimeArtifactsPath=$RunDir\artifacts\bin\mono\$RunOS.$RunArch.Release /p:RuntimeFlavor=mono
xcopy $RunDir\artifacts\bin\runtime\net8.0-$RunOS-Release-$RunArch\ $RunDir\artifacts\bin\testhost\net8.0-$RunOS-Release-$RunArch\shared\Microsoft.NETCore.App\8.0.0\ /e /y
xcopy $RunDir\artifacts\bin\testhost\net8.0-$RunOS-Release-$RunArch\ $RunDir\artifacts\dotnet-mono\ /e /y
xcopy $RunDir\artifacts\bin\coreclr\$RunOS.$RunArch.Release\corerun $RunDir\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun /y
# Create Core Root
$RunDir\src\tests\build.cmd release $RunArch generatelayoutonly /p:LibrariesConfiguration=Release
# Clone performance
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $RunDir\performance
# Use Interpreter
export MONO_ENV_OPTIONS="--interpreter"
# One line run:
python3 $RunDir\performance\scripts\benchmarks_ci.py --csproj $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --incremental no --architecture $RunArch -f net8.0 --filter 'System.Numerics.Tests.Perf_BigInteger*' --bdn-artifacts $RunDir\artifacts\BenchmarkDotNet.Artifacts --bdn-arguments="--anyCategories Libraries Runtime --category-exclusion-filter NoInterpreter NoMono --logBuildOutput --generateBinLog --corerun $RunDir\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe"
# Individual Commands:
# Restore
dotnet restore $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --packages $RunDir\performance\artifacts\packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1
# Build
dotnet build $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore /p:NuGetPackageRoot=$RunDir\performance\artifacts\packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1
# Run
dotnet run --project $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore --no-build -- --filter 'System.Numerics.Tests.Perf_BigInteger*' --anyCategories Libraries Runtime " --category-exclusion-filter NoInterpreter NoMono --logBuildOutput --generateBinLog --corerun $RunDir\artifacts\dotnet-mono\shared\Microsoft.NETCore.App\8.0.0\corerun.exe --artifacts $RunDir\artifacts\BenchmarkDotNet.Artifacts --packages $RunDir\performance\artifacts\packages
System.Numerics.Tests.Perf_BigInteger.Multiply(arguments: 16,8 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.ModPow(arguments: 16,16,16 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.ToByteArray(numberString: 123)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Ctor_ByteArray(numberString: -2147483648)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.ToStringX(numberString: 123)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.ToByteArray(numberString: -2147483648)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Add(arguments: 65536,65536 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Equals(arguments: 259 bytes, Same)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Ctor_ByteArray(numberString: 123)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Multiply(arguments: 1024,1024 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.ToStringX(numberString: -2147483648)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Subtract(arguments: 65536,65536 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.GreatestCommonDivisor(arguments: 65536,65536 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Equals(arguments: 67 bytes, DiffMiddleByte)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Multiply(arguments: 65536,65536 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Add(arguments: 1024,1024 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.GreatestCommonDivisor(arguments: 1024,1024 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.GreatestCommonDivisor(arguments: 16,16 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Remainder(arguments: 16,8 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Subtract(arguments: 1024,1024 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.ModPow(arguments: 16384,16384,64 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Divide(arguments: 16,8 bits)
ETL Files
Histogram
JIT Disasms
System.Numerics.Tests.Perf_BigInteger.Multiply(arguments: 1024,512 bits)
ETL Files
Histogram
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository