String charAt vs. bracket notation (v3)

Revision 3 of this benchmark created on


Setup

var text = "cat";
var result;

Test runner

Ready to run.

Testing in
TestOps/sec
String charAt
for(var i = 0; i < text.length; i++) {
	result = text.charAt(i);
}
ready
String bracket notation
for(var i = 0; i < text.length; i++) {
	result = text[i];
}
ready

Revisions

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