1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Improve callstack payload hashing speed.

This commit is contained in:
Bartosz Taudul 2018-06-24 15:25:53 +02:00
parent 64a38c591b
commit d78126e60f

View File

@ -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;