string.split string vs regex

Benchmark created on


Setup

const testId = "hello-there"

Test runner

Ready to run.

Testing in
TestOps/sec
string.split with string parameter
testId.split('-');
ready
string.split with regex parameter
testId.split(/(?<=[0-9a-f])-/)
ready

Revisions

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