Skip to content

Commit e2ad4c8

Browse files
committed
Update target frameworks
1 parent f19680f commit e2ad4c8

File tree

59 files changed

+124
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+124
-214
lines changed

BitFaster.Caching.Benchmarks/BitFaster.Caching.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<LangVersion>latest</LangVersion>
6-
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
77
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
88
<!-- https://stackoverflow.com/a/59916801/131345 -->
99
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>

BitFaster.Caching.Benchmarks/DataStructureBenchmarks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace BitFaster.Caching.Benchmarks
1010
#if Windows
1111
[SimpleJob(RuntimeMoniker.Net48)]
1212
#endif
13-
[SimpleJob(RuntimeMoniker.Net60)]
13+
[SimpleJob(RuntimeMoniker.Net90)]
1414
[MemoryDiagnoser(displayGenColumns: false)]
1515
public class DataStructureBenchmarks
1616
{

BitFaster.Caching.Benchmarks/DisposerBench.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace BitFaster.Caching.Benchmarks
1111
[DisassemblyDiagnoser(printSource: true, maxDepth: 3)]
1212
[SimpleJob(RuntimeMoniker.Net48)]
1313
#endif
14-
[SimpleJob(RuntimeMoniker.Net60)]
14+
[SimpleJob(RuntimeMoniker.Net90)]
1515
[MemoryDiagnoser(displayGenColumns: false)]
1616
[HideColumns("Job", "Median", "RatioSD", "Alloc Ratio")]
1717
public class DisposerBench

BitFaster.Caching.Benchmarks/DrainBenchmarks.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace BitFaster.Caching.Benchmarks
1010
[DisassemblyDiagnoser(printSource: true, maxDepth: 3)]
1111
[SimpleJob(RuntimeMoniker.Net48)]
1212
#endif
13-
[SimpleJob(RuntimeMoniker.Net60)]
13+
[SimpleJob(RuntimeMoniker.Net90)]
1414
[HideColumns("Job", "Median", "RatioSD", "Alloc Ratio")]
1515
public class DrainBenchmarks
1616
{
@@ -187,7 +187,7 @@ public void Add()
187187
public void DrainArray()
188188
{
189189
Add();
190-
#if NETCOREAPP3_1_OR_GREATER
190+
#if NET
191191
buffer.DrainTo(output.AsSpan());
192192
#else
193193
buffer.DrainTo(new ArraySegment<string>(output));

BitFaster.Caching.Benchmarks/Lfu/CmSketchFlat.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Text;
55
using System.Threading.Tasks;
66

7-
#if NETCOREAPP3_1_OR_GREATER
7+
#if NET
88
using System.Runtime.Intrinsics;
99
using System.Runtime.Intrinsics.X86;
1010
#endif
@@ -53,7 +53,7 @@ public CmSketchFlat(long maximumSize, IEqualityComparer<T> comparer)
5353
/// <returns>The estimated frequency of the value.</returns>
5454
public int EstimateFrequency(T value)
5555
{
56-
#if !NETCOREAPP3_1_OR_GREATER
56+
#if !NET
5757
return EstimateFrequencyStd(value);
5858
#else
5959

@@ -76,7 +76,7 @@ public int EstimateFrequency(T value)
7676
/// <param name="value">The value.</param>
7777
public void Increment(T value)
7878
{
79-
#if !NETCOREAPP3_1_OR_GREATER
79+
#if !NET
8080
IncrementStd(value);
8181
#else
8282

@@ -207,7 +207,7 @@ private int Spread(int x)
207207
return (int)((y >> 16) ^ y);
208208
}
209209

210-
#if NETCOREAPP3_1_OR_GREATER
210+
#if NET
211211
private unsafe int EstimateFrequencyAvx(T value)
212212
{
213213
int hash = Spread(comparer.GetHashCode(value));

BitFaster.Caching.Benchmarks/Lfu/CmSketchNoPin.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Diagnostics.CodeAnalysis;
43
using System.Runtime.CompilerServices;
54

65

7-
#if NET6_0_OR_GREATER
6+
#if NET
87
using System.Runtime.Intrinsics;
98
using System.Runtime.Intrinsics.Arm;
109
using System.Runtime.Intrinsics.X86;
@@ -57,7 +56,7 @@ public CmSketchNoPin(long maximumSize, IEqualityComparer<T> comparer)
5756
/// <returns>The estimated frequency of the value.</returns>
5857
public int EstimateFrequency(T value)
5958
{
60-
#if NET48
59+
#if NETSTANDARD
6160
return EstimateFrequencyStd(value);
6261
#else
6362

@@ -67,7 +66,7 @@ public int EstimateFrequency(T value)
6766
{
6867
return EstimateFrequencyAvx(value);
6968
}
70-
#if NET6_0_OR_GREATER
69+
#if NET
7170
else if (isa.IsArm64Supported)
7271
{
7372
return EstimateFrequencyArm(value);
@@ -86,7 +85,7 @@ public int EstimateFrequency(T value)
8685
/// <param name="value">The value.</param>
8786
public void Increment(T value)
8887
{
89-
#if NET48
88+
#if NETSTANDARD
9089
IncrementStd(value);
9190
#else
9291

@@ -96,7 +95,7 @@ public void Increment(T value)
9695
{
9796
IncrementAvx(value);
9897
}
99-
#if NET6_0_OR_GREATER
98+
#if NET
10099
else if (isa.IsArm64Supported)
101100
{
102101
IncrementArm(value);
@@ -233,7 +232,7 @@ private void Reset()
233232
size = (size - (count0 >> 2)) >> 1;
234233
}
235234

236-
#if NET6_0_OR_GREATER
235+
#if NET
237236
private unsafe int EstimateFrequencyAvx(T value)
238237
{
239238
int blockHash = Spread(comparer.GetHashCode(value));
@@ -267,7 +266,7 @@ private unsafe int EstimateFrequencyAvx(T value)
267266
.AsUInt16();
268267

269268
// set the zeroed high parts of the long value to ushort.Max
270-
#if NET6_0
269+
#if NET
271270
count = Avx2.Blend(count, Vector128<ushort>.AllBitsSet, 0b10101010);
272271
#else
273272
count = Avx2.Blend(count, Vector128.Create(ushort.MaxValue), 0b10101010);
@@ -333,7 +332,7 @@ private unsafe void IncrementAvx(T value)
333332
}
334333
#endif
335334

336-
#if NET6_0_OR_GREATER
335+
#if NET
337336
[MethodImpl(MethodImplOptions.AggressiveInlining)]
338337
private unsafe void IncrementArm(T value)
339338
{

BitFaster.Caching.Benchmarks/TimeBenchmarks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public int EnvironmentTickCount()
4141
[Benchmark()]
4242
public long EnvironmentTickCount64()
4343
{
44-
#if NETCOREAPP3_0_OR_GREATER
44+
#if NET
4545
return Environment.TickCount64;
4646
#else
4747
return 0;

BitFaster.Caching.HitRateAnalysis/BitFaster.Caching.HitRateAnalysis.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net9.0</TargetFramework>
66
<ServerGarbageCollection>true</ServerGarbageCollection>
77
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
88
<RetainVMGarbageCollection>true</RetainVMGarbageCollection>

BitFaster.Caching.ThroughputAnalysis/BitFaster.Caching.ThroughputAnalysis.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
66
<SignAssembly>False</SignAssembly>
77
<Version>2.0.0</Version>
88
<ServerGarbageCollection>true</ServerGarbageCollection>

BitFaster.Caching.UnitTests.Std/BitFaster.Caching.UnitTests.Std.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0</TargetFrameworks>
5-
<LangVersion>9.0</LangVersion>
4+
<TargetFrameworks>net9.0</TargetFrameworks>
5+
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>

0 commit comments

Comments
 (0)