BlackToppStudios / Mezz_Foundation

Foundational Data types that enforce no opinions on how to build games and provide many facilities that complex games need. This largely avoids graphics and physics, but provides tools like the SortedVector, CountedPtr and HashedString classes.
GNU General Public License v3.0
3 stars 0 forks source link

Port HashedString32 #55

Open MakoEnergy opened 5 years ago

MakoEnergy commented 5 years ago

Port over the HashedString32 class and its tests from the monolithic repo.

https://github.com/BlackToppStudios/Mezzanine/blob/master/Mezzanine/src/hashedstring.h https://github.com/BlackToppStudios/Mezzanine/blob/master/Mezzanine/src/hashedstring.cpp https://github.com/BlackToppStudios/Mezzanine/blob/master/UnitTests/tests/hashedstringtests.h

This was originally written pre-c++11, prior to the existence of std::hash. This may or may not be worthwhile for us to use, as the actual hashing algorithm is implementation defined (as long as it meets certain standardized criteria). So we should evaluate if we want the the std implementation, interface, or none. In the event we decide to port our own hashing implementation these files should be used:

https://github.com/BlackToppStudios/Mezzanine/blob/master/Mezzanine/src/Internal/murmurhash3.h.cpp https://github.com/BlackToppStudios/Mezzanine/blob/master/Mezzanine/src/Internal/murmurhash3.cpp

MakoEnergy commented 5 years ago

Also, this issue is relevant: https://github.com/BlackToppStudios/Mezzanine/issues/113

Edit: Since we're using C++17 now, HashedStringView?

MakoEnergy commented 5 years ago

As of commit c690896d8e6f71368b17e634261fc07901802e8e the Murmur hash functions from the monolith repo have been ported, getting one step closer to completing this.