Substring Extraction

Benchmark published by System on

Description

Compare substring vs slice.

Setup

const str = 'Hello World! This is a test string.';

Test Runner

Initializing...

Testing in
Test CaseOps/sec
substring
str.substring(6, 11);
ready
slice
str.slice(6, 11);
ready
substr
str.substr(6, 5);
ready

Revisions

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

Revision 1
publishedby Systemon