1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

AK: Inline most StringBase member functions

More work on recovering the performance regression from
DeprecatedFlyString removal.

Local measurements on my MBP:
- 2.5% speedup on Octane/zlib.js
- 2% speedup on Octane/typescript.js
This commit is contained in:
Andreas Kling 2025-03-26 07:11:07 +00:00 committed by Andreas Kling
parent a0f3099333
commit 53cac71cec
Notes: github-actions[bot] 2025-03-26 12:05:12 +00:00
5 changed files with 109 additions and 104 deletions

View file

@ -110,11 +110,6 @@ bool FlyString::operator==(char const* string) const
return bytes_as_string_view() == string;
}
void FlyString::did_destroy_fly_string_data(Badge<Detail::StringData>, Detail::StringData const& string_data)
{
all_fly_strings().remove(&string_data);
}
Detail::StringBase FlyString::data(Badge<String>) const
{
return m_data;
@ -220,4 +215,13 @@ bool FlyString::ends_with_bytes(StringView bytes, CaseSensitivity case_sensitivi
return bytes_as_string_view().ends_with(bytes, case_sensitivity);
}
namespace Detail {
void did_destroy_fly_string_data(Badge<Detail::StringData>, Detail::StringData const& string_data)
{
all_fly_strings().remove(&string_data);
}
}
}