startsWith vs equality

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
startsWith
const foo = "/some/path"
foo.startsWith("/some/path")
ready
equals
const foo = "/some/path"
foo === "/some/path"
ready
regex
RegExp("^/some/path").exec('/some/path') !== null
ready

Revisions

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