Substring Extraction Methods (middle to end) (substring, substr, slice) (v2)

Revision 2 of this benchmark created by callum on


Preparation HTML

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

Test runner

Ready to run.

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

Revisions

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