NDepend.API Documentation
Get4BytesHashCodeFast Method
NDepend.Helpers Namespace > ExtensionMethodsString Class : Get4BytesHashCodeFast Method
The string to get hash code for.
Get a 4 bytes string hash code, case-sensitive.
Syntax
[Extension()]
public static uint Get4BytesHashCodeFast( 
   string thisString
)

Parameters

thisString
The string to get hash code for.
Remarks
This method is about 4 times more performant than StringComparer.OrdinalIgnoreCase.GetHashCode(str).
It processes characters two by two by using pointers.
Requirements

Target Platforms: Windows 11, 10, 8, 7and Linux, MacOS with net10.0, net9.0 or net8.0 installed

See Also

Reference

ExtensionMethodsString Class
ExtensionMethodsString Members