aboutsummaryrefslogtreecommitdiff
path: root/src/core/gdbstub/gdbstub.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-18 05:55:49 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-18 19:57:26 -0300
commitd62f57cf5af7f329be618c0766d59ded55ff53b3 (patch)
tree1a2cf1845750a8873e61c50074952b1d36fb2726 /src/core/gdbstub/gdbstub.cpp
parentb571c92dfd0e6bc3efeae6087723996165273c06 (diff)
fixed_pipeline_state: Hash and compare the whole structure
Pad FixedPipelineState's size to 384 bytes to be a multiple of 16. Compare the whole struct with std::memcmp and hash with CityHash. Using CityHash instead of a naive hash should reduce the number of collisions. Improve used type traits to ensure this operation is safe. With these changes the improvements to the hashable pipeline state are: Optimized structure Hash: 89 ns Comparison: 103 ns Construction*: 164 ns Struct size: 384 bytes Original structure Hash: 148 ns Equal: 174 ns Construction*: 281 ns Size: 1384 bytes * Attribute state initialization is not measured These measures are averages taken with std::chrono::high_accuracy_clock on MSVC shipped on Visual Studio 16.6.0 Preview 2.1.
Diffstat (limited to 'src/core/gdbstub/gdbstub.cpp')
0 files changed, 0 insertions, 0 deletions