Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 7.0 Preview 7 #7683

Closed
dcwhittaker opened this issue Aug 9, 2022 · 6 comments
Closed

.NET 7.0 Preview 7 #7683

dcwhittaker opened this issue Aug 9, 2022 · 6 comments

Comments

@dcwhittaker
Copy link
Member

dcwhittaker commented Aug 9, 2022

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 dcwhittaker pinned this issue Aug 9, 2022
@dcwhittaker dcwhittaker unpinned this issue Aug 9, 2022
@dcwhittaker dcwhittaker pinned this issue Aug 9, 2022
@sanmuru
Copy link

sanmuru commented Aug 10, 2022

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.

@Vixenka
Copy link

Vixenka commented Aug 10, 2022

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.

@PhilPJL
Copy link

PhilPJL commented Aug 10, 2022

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);

@ShreyasJejurkar
Copy link

@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

@PhilPJL
Copy link

PhilPJL commented Aug 15, 2022

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

@dcwhittaker
Copy link
Member Author

Closing in favor of #7800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants