Quansight-Labs / numpy.net

A port of NumPy to .Net
BSD 3-Clause "New" or "Revised" License
137 stars 15 forks source link

Consider multitargeting to take advantage of newer .NET performance #59

Open lunarcloud opened 1 year ago

lunarcloud commented 1 year ago

https://learn.microsoft.com/en-us/nuget/create-packages/multiple-target-frameworks-project-file

<Project Sdk=”Microsoft.NET.Sdk”>
 <PropertyGroup>
 <TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
 </PropertyGroup> 
</Project>

When you package it, both dlls end up in the nuget

KevinBaselinesw commented 1 year ago

thanks for the tip. I am not sure what the advantage is.

Do you think that .net6.0 will offer higher performance than .netstandard2.0?

lunarcloud commented 11 months ago

Do you think that .net6.0 will offer higher performance than .netstandard2.0?

Yes, definitely it will improve the memory usage and performance at least slightly (probably more than)

KevinBaselinesw commented 11 months ago

I experimented with this when you first suggested it. I was able to build multiple versions of the library. But then I tried to use the new library in a test/performance app and got all sorts of link errors. You may have heard that I started a new job recently so I am pretty busy at the moment. When I get some free time maybe I will take another peak at this.