IntName is a lightweight, integer-backed string handle system that provides extremely fast string comparisons through interning. It offers low-overhead lookups and memory-efficient reuse of strings in performance-sensitive C# code. The global table is thread-safe and optimized for rapid creation and lookup of interned names.
Key benefits:
- Fast equality and comparison by integer handles instead of string comparisons
- Thread-safe global interning table and reverse lookup
- Case-insensitive creation via built-in extensions
Quick example:
using DonutPackage.Utils;
IntName progress = "progress"; // Implicit conversion and caching
IntName ciProgress = "Progress".ToIntNameIgnoreCase(); // Case-insensitive alias
if (progress == ciProgress)
{
// Fast integer-based comparison
}See the LICENSE file in the repository for license terms.
