diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2018-06-24 16:25:53 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2018-06-24 16:25:53 +0300 |
commit | d78126e60f75141264c9534702d4bf851376b41a (patch) | |
tree | 70987b4e267e26cc66439b28a0503c9cad042f20 /server/TracyVarArray.hpp | |
parent | 64a38c591b543b1d5154ae4ec383fa1b9c356929 (diff) |
Improve callstack payload hashing speed.
Diffstat (limited to 'server/TracyVarArray.hpp')
-rw-r--r-- | server/TracyVarArray.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/TracyVarArray.hpp b/server/TracyVarArray.hpp index 7d2f7fd8..e8dc0283 100644 --- a/server/TracyVarArray.hpp +++ b/server/TracyVarArray.hpp @@ -18,9 +18,14 @@ class VarArray public: VarArray( uint8_t size, const T* data ) : m_size( size ) - , m_hash( charutil::hash( (const char*)data, size * sizeof( T ) ) ) , m_ptr( data ) { + T hash = 0; + for( uint8_t i=0; i<size; i++ ) + { + hash += data[i]; + } + m_hash = uint32_t( hash ); } VarArray( const VarArray& ) = delete; |