Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,37 @@ jobs:
build:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-13
targetFramework:
- net8.0
- net7.0
- net6.0
- net5.0
- netcoreapp3.1
platform:
- x64
include:
- os: windows-latest
targetFramework: net48
platform: x64
- os: windows-latest
targetFramework: net48
platform: x86
- os: windows-latest
targetFramework: net7.0
platform: x86
- os: windows-latest
targetFramework: net6.0
platform: x86
- os: windows-latest
targetFramework: net5.0
platform: x86
- os: windows-latest
targetFramework: netcoreapp3.1
platform: x86
# .NET 8.0 Tests
- { os: windows-latest, targetFramework: net8.0, platform: x64 }
- { os: ubuntu-latest, targetFramework: net8.0, platform: x64 }
- { os: macos-15-intel, targetFramework: net8.0, platform: x64 }

# .NET 7.0 Tests
- { os: windows-latest, targetFramework: net7.0, platform: x64 }
- { os: ubuntu-latest, targetFramework: net7.0, platform: x64 }
- { os: macos-15-intel, targetFramework: net7.0, platform: x64 }
- { os: windows-latest, targetFramework: net7.0, platform: x86 }

# .NET 6.0 Tests
- { os: windows-latest, targetFramework: net6.0, platform: x64 }
- { os: ubuntu-latest, targetFramework: net6.0, platform: x64 }
- { os: macos-15-intel, targetFramework: net6.0, platform: x64 }
- { os: windows-latest, targetFramework: net6.0, platform: x86 }

# .NET 5.0 Tests (no Ubuntu, libSSL issues)
- { os: windows-latest, targetFramework: net5.0, platform: x64 }
- { os: macos-15-intel, targetFramework: net5.0, platform: x64 }
- { os: windows-latest, targetFramework: net5.0, platform: x86 }

# .NET Core 3.1 Tests (no Ubuntu, libSSL issues)
- { os: windows-latest, targetFramework: netcoreapp3.1, platform: x64 }
- { os: macos-15-intel, targetFramework: netcoreapp3.1, platform: x64 }
- { os: windows-latest, targetFramework: netcoreapp3.1, platform: x86 }

# .NET Framework 4.8 Tests (Windows only)
- { os: windows-latest, targetFramework: net48, platform: x64 }
- { os: windows-latest, targetFramework: net48, platform: x86 }

runs-on: ${{ matrix.os }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ internal static class UnstableStringHash
/// </remarks>
[ExcludeFromCodeCoverage] // "Cannot be accurately measured without multiple architectures. Known good impl." This is still tested tho.
[SuppressMessage("ReSharper", "InconsistentNaming")]
#if NET5_0_OR_GREATER
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
#else
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
internal static unsafe nuint GetHashCodeUnstable(this ReadOnlySpan<char> text)
{
#if NET7_0_OR_GREATER
Expand All @@ -51,9 +55,7 @@ internal static unsafe nuint GetHashCodeUnstable(this ReadOnlySpan<char> text)
}

#if NET7_0_OR_GREATER
#if NET8_0 // Bug in .NET 8 seems to cause this to not re-jit to tier1 till like 200k calls on Linux x64
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
#endif
internal static unsafe UIntPtr UnstableHashVec128(this ReadOnlySpan<char> text)
{
fixed (char* src = &text.GetPinnableReference())
Expand Down Expand Up @@ -118,9 +120,7 @@ internal static unsafe UIntPtr UnstableHashVec128(this ReadOnlySpan<char> text)
}
}

#if NET8_0 // Bug in .NET 8 seems to cause this to not re-jit to tier1 till like 200k calls on Linux x64
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
#endif
internal static unsafe UIntPtr UnstableHashVec256(this ReadOnlySpan<char> text)
{
fixed (char* src = &text.GetPinnableReference())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ internal static class UnstableStringHashLower
/// </remarks>
[ExcludeFromCodeCoverage] // "Cannot be accurately measured without multiple architectures. Known good impl." This is still tested tho.
[SuppressMessage("ReSharper", "InconsistentNaming")]
#if NET5_0_OR_GREATER
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
#else
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
internal static unsafe nuint GetHashCodeUnstableLower(this ReadOnlySpan<char> text)
{
#if NET7_0_OR_GREATER
Expand Down Expand Up @@ -99,9 +103,7 @@ internal static unsafe nuint GetHashCodeUnstableLowerSlow(this ReadOnlySpan<char
}

#if NET7_0_OR_GREATER
#if NET8_0 // Bug in .NET 8 seems to cause this to not re-jit to tier1 till like 200k calls on Linux x64
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
#endif
internal static unsafe UIntPtr UnstableHashVec128Lower(this ReadOnlySpan<char> text)
{
fixed (char* src = &text.GetPinnableReference())
Expand Down Expand Up @@ -222,9 +224,7 @@ internal static unsafe UIntPtr UnstableHashVec128Lower(this ReadOnlySpan<char> t
return GetHashCodeUnstableLowerSlow(text);
}

#if NET8_0 // Bug in .NET 8 seems to cause this to not re-jit to tier1 till like 200k calls on Linux x64
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
#endif
internal static unsafe UIntPtr UnstableHashVec256Lower(this ReadOnlySpan<char> text)
{
fixed (char* src = &text.GetPinnableReference())
Expand Down