This brings Span into the core of the library, including a custom hashmap that support ReadOnlySpan lookups. Because I wrote this hashmap myself, it is pretty terrible, but still better than millions of string allocations per second. This will provide a slight reduction in the suggest performance but a bigger improvement in the check performance. Most of the increased suggest cost is oddly due to the enumeration though all of they keys during n-gram scoring. I couldn't get any more improvement from that enumerator but maybe dotnet 7 will improve that 🤷♂️.
This brings Span into the core of the library, including a custom hashmap that support ReadOnlySpan lookups. Because I wrote this hashmap myself, it is pretty terrible, but still better than millions of string allocations per second. This will provide a slight reduction in the suggest performance but a bigger improvement in the check performance. Most of the increased suggest cost is oddly due to the enumeration though all of they keys during n-gram scoring. I couldn't get any more improvement from that enumerator but maybe dotnet 7 will improve that 🤷♂️.