Created
January 25, 2023 06:50
-
-
Save indutny/3f87a256eb77eac4a8b5f5f26458c991 to your computer and use it in GitHub Desktop.
V8 Benchmark for Intl.Segmenter#segment() improvements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const s = new Intl.Segmenter(); | |
const input = 'a'.repeat(100 * 1024); | |
console.time('segment'); | |
for (const _ of s.segment(input)) {} | |
console.timeEnd('segment'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment