I have been working on SymSpell project for uprading newer version. I did a lot of changes and I supposed to it will be faster than previous version. Yes it have been faster than previous version but problem is that it was slower than original version. Also original version have been writtern in C#. It is working faster than my implementation and it was make me very upset. Because everybody knows C/C++ is quite faster than c# and I got fail to make it.
I checked all codes line by line for finding problem with my code. Everything looks nice but there was a very big problem. Adding keys and searching was taking much time. Standard library is not fast enough as expected. It provides more portability on operating system and compilers but not it does not fast. Than I used my old friend Google hashmap and it was good enough but still was slower than original code.
Whan I told to my friend, he told to me “Why don’t you use just C for resolving this problem?” than I searched open source project for hashmap and hashset. Finally I found one project ın github but it is only support hashset. Also it had some limitation like using string as key. I decited to change his source code to my requirements and added new features to it.
Now I glad to show my new github project as simple_hash. Very new project and I have made todo list for my future working. It is very simple but It good enough to using on small project.
Currently my SymSpellPlusPlus application is faster than the original project :)
As you can see map is only works with pointer. You have to define value type as type name not with pointer symbol at definition. SimpleHashMap<char> means that you want to store char**. So you should be careful when you want to use SimpleHashMap.