Access to index

Benchmark created on


Setup

var data_as_string = '0123456789abcdef';
var 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() * data_as_string.length)];
ready
data_as_array
data_as_array[Math.floor(Math.random() * data_as_array.length)];
ready

Revisions

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