-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
424 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<ImplicitUsings>false</ImplicitUsings> | ||
<Nullable>disable</Nullable> | ||
<LangVersion>preview</LangVersion> | ||
<TargetFrameworks>net8.0</TargetFrameworks> | ||
<LangVersion>Latest</LangVersion> | ||
<Authors>Wiljan Ruizendaal</Authors> | ||
<PackageReleaseNotes> | ||
Add robinhood hashmap and quadratic hashmap | ||
</PackageReleaseNotes> | ||
<PackageProjectUrl>https://github.com/Wsm2110/Faster.Map</PackageProjectUrl> | ||
<AssemblyVersion>5.0.4</AssemblyVersion> | ||
<FileVersion>5.0.4</FileVersion> | ||
<Title>Fastest .net hashmap</Title> | ||
<Version>5.0.4</Version> | ||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild> | ||
<Description>Cutting-edge NuGet package offering high-performance hash map implementations leveraging SIMD (Single Instruction, Multiple Data) instructions. This innovative library combines the efficiency of SIMD operations with advanced hashing techniques </Description> | ||
<RepositoryUrl>https://github.com/Wsm2110/Faster.Map</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageTags>Hashmap Hashtable Dictionary Faster.map performance, simd, robinhood hashing, swisstable, absl</PackageTags> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Faster.Map.Core\Faster.Map.Core.csproj"> | ||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly> | ||
<IncludeAssets>Faster.Map.Core.dll</IncludeAssets> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Faster.Map.DenseMap\Faster.Map.DenseMap.csproj"> | ||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly> | ||
<IncludeAssets>Faster.Map.DenseMap.dll</IncludeAssets> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Faster.Map.QuadMap\Faster.Map.QuadMap.csproj"> | ||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly> | ||
<IncludeAssets>Faster.Map.QuadMap.dll</IncludeAssets> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Faster.Map.RobinhoodMap\Faster.Map.RobinhoodMap.csproj" > | ||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly> | ||
<IncludeAssets>Faster.Map.RobinhoodMap.dll</IncludeAssets> | ||
</ProjectReference> | ||
|
||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<EmbedAllSources>True</EmbedAllSources> | ||
<DebugType>embedded</DebugType> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> | ||
<PackageId>Faster.Map</PackageId> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Update="../README.md"> | ||
<Pack>True</Pack> | ||
<PackagePath>\</PackagePath> | ||
</None> | ||
</ItemGroup> | ||
|
||
|
||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
src/Faster.Map.RobinhoodMap/Faster.Map.RobinhoodMap.csproj
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.IO.Hashing; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Faster.Map.Core | ||
{ | ||
|
||
public record struct StringWrapper: IEquatable<StringWrapper> | ||
{ | ||
int hashcode; | ||
public string Unwrapped { get; set; } | ||
|
||
public StringWrapper(string unwrapped) | ||
{ | ||
Unwrapped = unwrapped; | ||
|
||
var span = unwrapped.AsSpan(); | ||
var result = XxHash3.HashToUInt64(MemoryMarshal.AsBytes(span)) >> 32; | ||
hashcode = Unsafe.As<ulong, int>(ref result); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public override int GetHashCode() | ||
{ | ||
return hashcode; | ||
} | ||
|
||
public static implicit operator string(StringWrapper source) | ||
{ | ||
return source.Unwrapped; | ||
} | ||
|
||
public static implicit operator StringWrapper(string source) | ||
{ | ||
return new StringWrapper(source); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.