mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Skip comparing known to be matching memory.
This commit is contained in:
parent
1ecdb8aa2a
commit
8b15cd049c
@ -1435,7 +1435,7 @@ static inline void AdvanceTo( const char*& line, const char* match )
|
||||
{
|
||||
auto bit = __builtin_ctz( b );
|
||||
auto test = ptr + bit;
|
||||
if( memcmp( test, match, S ) == 0 )
|
||||
if( memcmp( test + 1, match + 1, S - 1 ) == 0 )
|
||||
{
|
||||
line = test;
|
||||
return;
|
||||
@ -1459,7 +1459,7 @@ static inline void AdvanceTo( const char*& line, const char* match )
|
||||
{
|
||||
if( ( l & 0xFF ) == first )
|
||||
{
|
||||
if( memcmp( ptr + i, match, S ) == 0 )
|
||||
if( memcmp( ptr + i + 1, match + 1, S - 1 ) == 0 )
|
||||
{
|
||||
line = ptr + i;
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user