tzaeschke / phtree-cpp

PH-Tree C++ implementation
Apache License 2.0
28 stars 9 forks source link

Avoid std::uint16_t #17

Closed tzaeschke closed 2 years ago

tzaeschke commented 2 years ago

This patch replaces the use of std::uint16_t with std::uint32_t. This increases performance of emplace/insert by up to 15%, see attached benchmark results. The exact reason has not be determined but this is likely due to std::uint16_t tending to require more CPU cycles for math operations. It may also be related to less efficient optimization when using std::uint16_t types in the with vectorization. 2022-04-avoid-uin16.txt