Test performance of textecoder versus regex

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
TextEncoder
const noMultibyte = str => str.length === (new TextEncoder().encode(str)).length;
ready
Regex
const noMultibyte = str => !/[^\x00-\x7F]/.test(str);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.