Access to index (v2)

Revision 2 of this benchmark created on


Setup

const data_as_string = '0123456789abcdef';
const data_as_array = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];

Test runner

Ready to run.

Testing in
TestOps/sec
data_as_string
data_as_string[Math.floor(Math.random() * 14)];
ready
data_as_array
data_as_array[Math.floor(Math.random() * 14)];
ready

Revisions

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