Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8
Safari 10
Mac OS X 10.12.6
Other
7 years ago
Test name Executions per second
Id and class chaining selector 323155.2 Ops/sec
Class selector only 570200.0 Ops/sec
Id selector then .find 439855.9 Ops/sec
Class selector using parent element 395986.1 Ops/sec
parentEl with .find 791879.7 Ops/sec
Class selector using parentEl 551895.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Id and class chaining selector

  • Class selector only

  • Id selector then .find

  • Class selector using parent element

  • parentEl with .find

  • Class selector using parentEl