Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Chrome 56
Windows 7
Other
7 years ago
Test name Executions per second
jQuery(jQuery.clone()) 97632.6 Ops/sec
jQuery(jQuery).clone() 138031.3 Ops/sec
jQuery(JavaScript).clone() 160626.3 Ops/sec
jQuery(JavaScript.cloneNode.content) 332845.1 Ops/sec
jQuery(JavaScript.content.cloneNode) 383061.5 Ops/sec
jQuery(getElementById.content.cloneNode) 401962.0 Ops/sec
Pure JavaScript.cloneNode.content 399433.0 Ops/sec
Pure JavaScript.content.cloneNode 480393.9 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