diff options
| author | Berkan Diler <b.diler@gmx.de> | 2022-11-18 04:10:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-18 03:10:44 +0000 |
| commit | c1372ed775e11aa4759fd3460f2e01d16372205a (patch) | |
| tree | 790e0cbe56f0a4f4992307685fa3c31e04b0e6e1 /ARMeilleure/Common/BitUtils.cs | |
| parent | a16682cfd3c9be230bb5fb8b9b656ba182ef1f44 (diff) | |
Use ReadOnlySpan<byte> compiler optimization in more places (#3853)
* Use ReadOnlySpan<byte> compiler optimization in more places
* Revert changes in ShaderBinaries.cs
* Remove unused using;
* Use ReadOnlySpan<byte> compiler optimization in more places
Diffstat (limited to 'ARMeilleure/Common/BitUtils.cs')
| -rw-r--r-- | ARMeilleure/Common/BitUtils.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ARMeilleure/Common/BitUtils.cs b/ARMeilleure/Common/BitUtils.cs index 51160eff..e7697ff3 100644 --- a/ARMeilleure/Common/BitUtils.cs +++ b/ARMeilleure/Common/BitUtils.cs @@ -1,15 +1,11 @@ +using System; using System.Numerics; namespace ARMeilleure.Common { static class BitUtils { - private static readonly sbyte[] HbsNibbleLut; - - static BitUtils() - { - HbsNibbleLut = new sbyte[] { -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 }; - } + private static ReadOnlySpan<sbyte> HbsNibbleLut => new sbyte[] { -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 }; public static long FillWithOnes(int bits) { |
