aarondandy / WeCantSpell.Hunspell

A port of Hunspell v1 for .NET and .NET Standard
https://www.nuget.org/packages/WeCantSpell.Hunspell/
Other
126 stars 19 forks source link

The big Span<char> update #74

Closed aarondandy closed 2 years ago

aarondandy commented 2 years ago

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 🤷‍♂️.