Run details:
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Chrome 55
Windows 8.1
Other
7 years ago
Test name Executions per second
:focusable").first() 103.9 Ops/sec
:focusable")[0] 104.3 Ops/sec
:focusable").filter(":first") 105.6 Ops/sec
:focusable:first 104.7 Ops/sec
firstFocusableOfList 1348.1 Ops/sec
firstFocusableOfList2 324.9 Ops/sec
findFistElementFocusable 1604.9 Ops/sec
firstFocusableElement 2971.6 Ops/sec
findLastElementFocusable 1008.1 Ops/sec
lastFocusableElement 1114.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • :focusable").first()

  • :focusable")[0]

  • :focusable").filter(":first")

  • :focusable:first

  • firstFocusableOfList

  • firstFocusableOfList2

  • findFistElementFocusable

  • firstFocusableElement

  • findLastElementFocusable

  • lastFocusableElement


;