forrestthewoods / lib_fts

single-file public domain libraries
661 stars 139 forks source link

Added C# implementation of fuzzy match #4

Closed CDillinger closed 8 years ago

CDillinger commented 8 years ago

This includes the C# implementation of fuzzy search, along with a test application based on the C++ test. These files are both part of a C# project which I added to the VS2015 Solution.

CDillinger commented 8 years ago

On my Dual-Xeon E5240 @ 3.0GHz running Windows 7, after compiling both the C++ version and the C# version in x64 release mode, I got the following results (time output by the programs):

355k wordlist

Count matches of "health"

C++ - 42.338ms C# - 201.633ms

Print matches of "mother" alphabetically

C++ - 40.037ms C# - 208.222ms

Print matches of "earth" by rank

C++ - 92.677ms C# - 386.229ms

UE4 Filenames

Count matches of "object"

C++ - 3.8518ms C# - 26.707ms

Print matches of "aes" alphabetically

C++ - 4.036ms C# - 25.132ms

Print matches of "asset" by rank

C++ - 10.956ms C# - 60.466ms

If anyone has any suggestions for performance increase of my implementation, please let me know.

forrestthewoods commented 8 years ago

After careful consideration I've decided that I'm going to leave ports external and link out to them from the front page. Send me a link to a repo you're happy with and I'll update the readme.