Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0
Firefox 48
Windows
Other
8 years ago
Test name Executions per second
1 div with javascript 4837207.0 Ops/sec
1 div with jquery selector 1853679.2 Ops/sec
2 divs with javascript. Add with jquery 360779.2 Ops/sec
2 divs with 2 jquery selectors. Add with jquery 317225.8 Ops/sec
2 divs with javascript. Add with array 1136521.4 Ops/sec
2 divs with 2 jquery selectors. Add with array 572183.7 Ops/sec
2 divs with single jquery selector 750.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • 1 div with javascript

  • 1 div with jquery selector

  • 2 divs with javascript. Add with jquery

  • 2 divs with 2 jquery selectors. Add with jquery

  • 2 divs with javascript. Add with array

  • 2 divs with 2 jquery selectors. Add with array

  • 2 divs with single jquery selector

  • 1 div with jquery selector with context


;