mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
We were already caching UTF-8 and byte strings, so let's add a cache for UTF-16 strings as well. This is particularly profitable whenever we run regular expressions, since the output of regex execution is a set of UTF-16 strings. Note that this is a weak cache like the other JS string caches, meaning that strings are removed from the cache as they are garbage collected. This avoids billions of PrimitiveString allocations across a run of WPT, significantly reducing GC activity.
11 KiB
11 KiB