with another test

JavaScript performance comparison

Test case created by Nurbek

Preparation code

<form>
  <input type="text" value="test" placeholder="test" name="test" />
</form>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
with_with
with(document){
  forms[0].getElementsByTagName('input')[0].setAttribute('class', 'field');
  querySelector('form input[type=text]').placeholder = 'nothing';
}
pending…
without_with

  document.forms[0].getElementsByTagName('input')[0].setAttribute('class', 'field');
  document.querySelector('form input[type=text]').placeholder = 'nothing';
pending…

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

Compare results of other browsers

0 comments

Add a comment