Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36
Chrome 54
Linux
Other
8 years ago
Test name Executions per second
jQuery(jQuery.clone()) 86528.1 Ops/sec
jQuery(jQuery).clone() 121788.1 Ops/sec
jQuery(JavaScript).clone() 143235.9 Ops/sec
jQuery(JavaScript.cloneNode.content) 304691.4 Ops/sec
jQuery(JavaScript.content.cloneNode) 368342.9 Ops/sec
jQuery(getElementById.content.cloneNode) 359101.7 Ops/sec
Pure JavaScript.cloneNode.content 352654.4 Ops/sec
Pure JavaScript.content.cloneNode 461612.0 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