core icon indicating copy to clipboard operation
core copied to clipboard

.NET 7.0 Preview 7

Open dcwhittaker opened this issue 1 year ago • 3 comments

Release Notes

Please report any issues you find with .NET 7 Preview 7, either responding to this issue, creating a new issue or creating a new issue in one of the following repos:

Known Issues

If there are any issues with this release we will track them here and check issues off as they're resolved. See the linked issues for details on progress and resolution details.

dcwhittaker avatar Aug 09 '22 16:08 dcwhittaker

Still cannot build WPF projects using source generators coming from Nuget packages. Although there is a workaround in known issues of release notes 6.0, none of dotnet/wpf, dotnet/sdk, dotnet/msbuild fix this.

sanmuru avatar Aug 10 '22 03:08 sanmuru

In ITrigonometricFunctions<TSelf> Atan2 and Atan2Pi methods are no longer included.

We can implement it manually with some helper basing on Atan or AtanPi method, but it will not support hardware acceleration (unless the JIT does something). And for example, architectures such as x86 and AMD64 have the FPATAN instruction, which is a hardware implementation of Atan2.

Vixenka avatar Aug 10 '22 06:08 Vixenka

I was assuming .NET 7 would be faster (or least not slower). Unfortunately this code runs significantly slower in .NET 7 preview 7 compared to .NET 6. I get .NET 6 - 650ms, .NET 7 - 850ms.

using MathNet.Numerics.IntegralTransforms;
using MathNet.Numerics;
using System.Diagnostics;
using System.Numerics;

Control.UseManaged();

var buffer = Generate
    .Square(2048, 32, 32, -20.0, 20.0)
    .Select(r => new Complex(r, 0))
    .ToArray();

var sw = new Stopwatch();
sw.Start();

for (int i = 0; i < 10000; i++)
{
    Fourier.Forward(buffer, FourierOptions.AsymmetricScaling);
}

sw.Stop();

Console.Write(sw.Elapsed.TotalMilliseconds);

PhilPJL avatar Aug 10 '22 07:08 PhilPJL

@PhilPJL Please use Benchmark.dot.net for benchmarking C# code instead of a stopwatch. If you still see perf regression, please consider opening the issue at the runtime repo. https://github.com/dotnet/runtime

ShreyasJejurkar avatar Aug 15 '22 05:08 ShreyasJejurkar

@ShreyasJejurkar Interesting, with BenchmarkDotNet. I get: .NET 5: 630ms .NET 6: 652ms
.NET 7: 554ms So .NET 7 is faster. Good :)

PhilPJL avatar Aug 15 '22 08:08 PhilPJL

Closing in favor of https://github.com/dotnet/core/issues/7800

dcwhittaker avatar Sep 14 '22 17:09 dcwhittaker