StringSimilarity.NET
StringSimilarity.NET copied to clipboard
Add benchmark project, some small optimizations
This adds a BenchmarkDotNet project so that we can measure improvements (or regressions) with different changes.
This also does some improvements to reduce execution time and allocations on some benchmarks:
- Cosine: 355 -> 331ns, allocations 896 -> 816B
- Jaccard: 524 -> 502ns, allocations 1272 -> 1264B
- QGram: 622 -> 503ns, allocations 1272 -> 1144B
- SorensenDice allocations 1272 -> 1144B (note: slight perf regression 510 -> 557ns)