Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063
Chrome 52
Windows
Other
7 years ago
Test name Executions per second
jQuery(jQuery.clone()) 18057.5 Ops/sec
jQuery(jQuery).clone() 28894.0 Ops/sec
jQuery(JavaScript).clone() 29731.1 Ops/sec
jQuery(JavaScript.cloneNode.content) 32503.9 Ops/sec
jQuery(JavaScript.content.cloneNode) 59977.6 Ops/sec
jQuery(getElementById.content.cloneNode) 57305.5 Ops/sec
Pure JavaScript.cloneNode.content 33512.2 Ops/sec
Pure JavaScript.content.cloneNode 83311.6 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