perf: Make promise stack trace collection opt-in.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled

This commit is contained in:
2025-02-27 19:41:21 -05:00
parent 8912212d8e
commit 8b47938238
4 changed files with 50 additions and 31 deletions

View File

@ -683,3 +683,14 @@ bool tf_util_is_mobile()
{
return TF_IS_MOBILE != 0;
}
uint32_t tf_util_fnv32a(const void* buffer, int length, uint32_t start)
{
uint32_t result = 0x811c9dc5;
for (int i = 0; i < length; i++)
{
result ^= ((const uint8_t*)buffer)[i];
result += (result << 1) + (result << 4) + (result << 7) + (result << 8) + (result << 24);
}
return result;
}