string split vs regex

Benchmark created on


Setup

const text = "hello.world";
const RE = /^(\w+).(\w+)$/

Test runner

Ready to run.

Testing in
TestOps/sec
split
text.split(".")
ready
regex match
text.match(RE)
ready

Revisions

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