forked from gcc-mirror/gcc
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes libstdc++ hashable function to use double instead of long double
Oracle quite a few years ago was changing the bucket calculation from using float to calculate the primes. I presume they were generating excessively large maps and needed larger primes. Originally they intended to just move up to double with the implementation, but then a question was raised on the mailing list about just using long double instead. They decided at that point just to move to using long double as an overkill solution solution. The problem with this solution is that for anyone not running x86, this can fall down a software floating point implementation path. AArch64 is a good example where it will fall down a 128bit soft float implementation for calculating this. Instead of accepting terrible performance for our bucket calculations; move the implementation down to double. If some HPC class application ends up getting inefficient bucket calculation at this point, maybe they should instead invest in a hashmap implementation specifically optimized for huge data sets.
- Loading branch information
1 parent
ee5c3db
commit 8a2b738
Showing
2 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters