Include limited debug info in release builds to help with profiling.
Also add another profile that's equivalent to CMake's RelWithDebInfo.
Testing suggests that although it uses a lower opt-level, it might
actually perform better (at least on Windows), though the differences
are only ~ 100 ms in startup and sorting times.
The default std hasher is DoS-resistant but relatively slow, and
DoS-resistance isn't a useful property during sorting.
I tested using the rustc-hash, fnv and ahash crates against my
1600-plugin load order, and the results vs the default std hasher
were:
- AHash: 31% faster
- FNV: 33% faster
- FxHasher (from rustc-hash): 37% faster
With the std hasher the Rust libloot is 35% slower than C++, with
FxHasher it's 15% faster.
They're not provided by C++ libloot, but they're needed to usefully expose these types to C++ since it doesn't have an equivalent of the 'self' method receiver.
This gives function/line/region coverage of 88%/91%/84%. Most of the
translation bugs fixed in earlier commits were found while writing these
tests: the tests were kept separate to not drown out the fixes in the
commit diffs.