diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index a9d5ba5..034fcca 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,9 +16,9 @@ jobs: working-directory: ./Aero steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - name: Restore dependencies @@ -44,7 +44,7 @@ jobs: body="${body//$'\r'/'%0D'}" echo ::set-output name=body::$body - name: Commit Comment - uses: peter-evans/commit-comment@v1.3.2 + uses: peter-evans/commit-comment@v3 with: body: | Benchmark result (use as a guide): @@ -56,7 +56,7 @@ jobs: path: ./cache key: ${{ runner.os }}-benchmark - name: Store benchmark result - uses: Happypig375/github-action-benchmark@v1.8.2 + uses: benchmark-action/github-action-benchmark@v1 if: github.event_name != 'pull_request' with: name: Benchmark.Net Benchmark diff --git a/Aero/Aero.Gen/Genv2.cs b/Aero/Aero.Gen/Genv2.cs index 899bfd4..e33a7e2 100644 --- a/Aero/Aero.Gen/Genv2.cs +++ b/Aero/Aero.Gen/Genv2.cs @@ -214,8 +214,8 @@ public class AeroTypeHandler Reader = (name, typeCast) => $"{name}.X = MemoryMarshal.Read(data.Slice(offset, 4));" + $"{name}.Y = MemoryMarshal.Read(data.Slice(offset + 4, 4));", Writer = (name, typeCast) => - $"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), ref {name}.X);" + - $"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), ref {name}.Y);" + $"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), in {name}.X);" + + $"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), in {name}.Y);" } }, { @@ -226,9 +226,9 @@ public class AeroTypeHandler $"{name}.Y = MemoryMarshal.Read(data.Slice(offset + 4, 4));" + $"{name}.Z = MemoryMarshal.Read(data.Slice(offset + 8, 4));", Writer = (name, typeCast) => - $"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), ref {name}.X);" + - $"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), ref {name}.Y);" + - $"MemoryMarshal.Write(buffer.Slice(offset + 8, sizeof(float)), ref {name}.Z);" + $"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), in {name}.X);" + + $"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), in {name}.Y);" + + $"MemoryMarshal.Write(buffer.Slice(offset + 8, sizeof(float)), in {name}.Z);" } }, { @@ -240,10 +240,10 @@ public class AeroTypeHandler $"{name}.Z = MemoryMarshal.Read(data.Slice(offset + 8, 4));" + $"{name}.W = MemoryMarshal.Read(data.Slice(offset + 12, 4));", Writer = (name, typeCast) => - $"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), ref {name}.X);" + - $"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), ref {name}.Y);" + - $"MemoryMarshal.Write(buffer.Slice(offset + 8, sizeof(float)), ref {name}.Z);" + - $"MemoryMarshal.Write(buffer.Slice(offset + 12, sizeof(float)), ref {name}.W);" + $"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), in {name}.X);" + + $"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), in {name}.Y);" + + $"MemoryMarshal.Write(buffer.Slice(offset + 8, sizeof(float)), in {name}.Z);" + + $"MemoryMarshal.Write(buffer.Slice(offset + 12, sizeof(float)), in {name}.W);" } }, { diff --git a/Aero/Aero.TestCases/Aero.TestCases.csproj b/Aero/Aero.TestCases/Aero.TestCases.csproj index 55cb813..d0bd7b8 100644 --- a/Aero/Aero.TestCases/Aero.TestCases.csproj +++ b/Aero/Aero.TestCases/Aero.TestCases.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net8.0 true $(BaseIntermediateOutputPath)GeneratedFiles @@ -18,9 +18,9 @@ - - - + + + all runtime; build; native; contentfiles; buildtransitive diff --git a/Aero/Aero.UnitTests/Aero.UnitTests.csproj b/Aero/Aero.UnitTests/Aero.UnitTests.csproj index ddb2861..fb1face 100644 --- a/Aero/Aero.UnitTests/Aero.UnitTests.csproj +++ b/Aero/Aero.UnitTests/Aero.UnitTests.csproj @@ -1,7 +1,7 @@ - net5.0 + net8.0 false true @@ -16,14 +16,14 @@ - + - - - + + + all runtime; build; native; contentfiles; buildtransitive diff --git a/Aero/Aero.UnitTests/Benchmarks/Reading.cs b/Aero/Aero.UnitTests/Benchmarks/Reading.cs index fbbf1ad..aa5c02e 100644 --- a/Aero/Aero.UnitTests/Benchmarks/Reading.cs +++ b/Aero/Aero.UnitTests/Benchmarks/Reading.cs @@ -73,7 +73,7 @@ public partial class BenchmarkPackedSizeComplexTest } //[SimpleJob(RuntimeMoniker.NetCoreApp30)] - [SimpleJob(RuntimeMoniker.NetCoreApp50, launchCount: 1, warmupCount: 5, targetCount: 10)] + [SimpleJob(RuntimeMoniker.Net80, launchCount: 1, warmupCount: 5, iterationCount: 10)] [MemoryDiagnoser] [JsonExporterAttribute.Full] [JsonExporterAttribute.FullCompressed]