Run details:
Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36
Chrome 62
Fedora
Other
7 years ago
Test name Executions per second
jQuery(jQuery.clone()) 99686.8 Ops/sec
jQuery(jQuery).clone() 157485.0 Ops/sec
jQuery(JavaScript).clone() 178991.5 Ops/sec
jQuery(JavaScript.cloneNode.content) 279175.4 Ops/sec
jQuery(JavaScript.content.cloneNode) 332122.1 Ops/sec
jQuery(getElementById.content.cloneNode) 367965.4 Ops/sec
Pure JavaScript.cloneNode.content 295540.1 Ops/sec
Pure JavaScript.content.cloneNode 416770.2 Ops/sec
HTML Preparation code:
Tests:
  • jQuery(jQuery.clone())

  • jQuery(jQuery).clone()

  • jQuery(JavaScript).clone()

  • jQuery(JavaScript.cloneNode.content)

  • jQuery(JavaScript.content.cloneNode)

  • jQuery(getElementById.content.cloneNode)

  • Pure JavaScript.cloneNode.content

  • Pure JavaScript.content.cloneNode