Skip to content

Commit 0c89785

Browse files
committed
#191 - update benchmarks to .NET 10, upgrade BenchmarkDotNet to 0.15.6
1 parent d5ccfc3 commit 0c89785

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<ItemGroup>
3-
<PackageVersion Include="BenchmarkDotNet" Version="0.15.4" />
3+
<PackageVersion Include="BenchmarkDotNet" Version="0.15.6" />
44
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0">
55
<PrivateAssets>all</PrivateAssets>
66
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

benchmarks/HydraScript.Benchmarks/InvokeBenchmark.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
using System.Diagnostics.CodeAnalysis;
21
using BenchmarkDotNet.Attributes;
32
using BenchmarkDotNet.Jobs;
4-
using BenchmarkDotNet.Running;
5-
using HydraScript.Benchmarks;
63
using HydraScript.Infrastructure;
74
using Microsoft.Extensions.DependencyInjection;
85
using Microsoft.Extensions.Logging;
96
using Microsoft.Extensions.Logging.Abstractions;
107
using Microsoft.Extensions.Options;
118

12-
[assembly: ExcludeFromCodeCoverage]
13-
14-
BenchmarkRunner.Run<InvokeBenchmark>();
9+
namespace HydraScript.Benchmarks;
1510

1611
[SimpleJob(RuntimeMoniker.Net10_0)]
1712
[SimpleJob(RuntimeMoniker.NativeAot10_0)]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using System.Diagnostics.CodeAnalysis;
2+
using BenchmarkDotNet.Running;
3+
using HydraScript.Benchmarks;
4+
5+
[assembly: ExcludeFromCodeCoverage]
6+
7+
BenchmarkRunner.Run<InvokeBenchmark>();

benchmarks/Readme.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
```
2-
3-
BenchmarkDotNet v0.15.4, macOS Ventura 13.7.2 (22H313) [Darwin 22.6.0]
4-
Apple M1 Pro, 1 CPU, 10 logical and 10 physical cores
5-
.NET SDK 9.0.305
6-
[Host] : .NET 9.0.9 (9.0.9, 9.0.925.41916), Arm64 RyuJIT armv8.0-a
7-
.NET 9.0 : .NET 9.0.9 (9.0.9, 9.0.925.41916), Arm64 RyuJIT armv8.0-a
8-
NativeAOT 9.0 : .NET 9.0.9, Arm64 NativeAOT armv8.0-a
9-
10-
2+
BenchmarkDotNet v0.15.6, Windows 10 (10.0.19045.6456/22H2/2022Update)
3+
12th Gen Intel Core i7-12650H 2.30GHz, 1 CPU, 16 logical and 10 physical cores
4+
.NET SDK 10.0.100
5+
[Host] : .NET 10.0.0 (10.0.0, 10.0.25.52411), X64 RyuJIT x86-64-v3
6+
.NET 10.0 : .NET 10.0.0 (10.0.0, 10.0.25.52411), X64 RyuJIT x86-64-v3
7+
NativeAOT 10.0 : .NET 10.0.0, X64 NativeAOT x86-64-v3
118
```
12-
| Method | Job | Runtime | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
13-
|--------|---------------|---------------|---------:|----------:|----------:|----------:|---------:|----------:|
14-
| Invoke | .NET 9.0 | .NET 9.0 | 9.525 ms | 0.1615 ms | 0.1658 ms | 1562.5000 | 500.0000 | 9.37 MB |
15-
| Invoke | NativeAOT 9.0 | NativeAOT 9.0 | 7.321 ms | 0.0544 ms | 0.0509 ms | 1562.5000 | 468.7500 | 9.36 MB |
9+
10+
| Method | Job | Runtime | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
11+
|--------|----------------|----------------|----------:|----------:|----------:|---------:|---------:|----------:|
12+
| Invoke | .NET 10.0 | .NET 10.0 | 11.569 ms | 0.2307 ms | 0.4966 ms | 828.1250 | 312.5000 | 10.04 MB |
13+
| Invoke | NativeAOT 10.0 | NativeAOT 10.0 | 8.227 ms | 0.1093 ms | 0.0969 ms | 828.1250 | 218.7500 | 10.05 MB |

0 commit comments

Comments
 (0)