core
core copied to clipboard
.NET 7.0 Preview 7
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:
- dotnet/aspnetcore - for ASP.NET Core questions
- dotnet/efcore - for Entity Framework Core questions
- dotnet/sdk - for CLI tools and questions
- dotnet/runtime - for runtime, API, or installer issues and questions
- dotnet/winforms - for WinForms issues
- dotnet/wpf - for WPF issues
- nuget/home - for NuGet questions and issues
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.
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.
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.
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 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
Interesting, with BenchmarkDotNet. I get:
.NET 5: 630ms
.NET 6: 652ms
.NET 7: 554ms
So .NET 7 is faster. Good :)
Closing in favor of https://github.com/dotnet/core/issues/7800