boostorg / boostorg/container_hash
Regression in boost::hash with version 1.81.0
- Dominant language
- C++
- Stars
- 39
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
We are noticing regression with `boost::hash` when used with `std::u16string` in boost 1.81.0 version and compared to 1.78.0. As per the 1.81.0 documentation, it seems there are major changes in `boost::hash` and the performance with string should be improved. Any thoughts on this regression?
Sample program -
```
#include
#include
#include
int main()
{
// Start the timer
auto start = std::chrono::high_resolution_clock::now();
for(int i = 0; i < 10; i++)
{
boost::hash()(u"hello");
}
// End the timer
auto end = std::chrono::high_resolution_clock::now();
// Calculate the duration
std::chrono::duration duration = end - start;
// Print the duration in seconds
std::cout << "Execution time: " << (duration.count())/10 << " seconds." << std::endl;
return 0;
}
```
Link 1.78.0 - https://godbolt.org/z/ManWPoK8j
Link 1.81.0 - https://godbolt.org/z/hejbsfhc6
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.