Substring Extraction Methods (substring, substr, slice)

Benchmark created by Jack on


Preparation HTML

<script>
  var str = "Good news, everyone!";
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
substring
str.substring(5,9);
ready
slice
str.slice(5,9);
ready
substr
str.substr(5,4);
ready

Revisions

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