mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 15:26:07 +00:00

When reloading https://en.wikipedia.org/wiki/Barack_Obama that is used by browsertime benchmark, `CountGraphemeClusters` is called around 3000 times. But half calls are that `aText` is empty. So if we add fast path for empty text, we can avoid a lot of heap allocations of `ICU4XGraphemeClusterBreakIteratorUtf16`. Differential Revision: https://phabricator.services.mozilla.com/D196008