Script Preparation code:
x
 
function makeImage( src ) {
  var img = document.createElement( 'img' );
  img.className='nail';
  if ( src ) {
    img.src='data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
  }
  return img;
}
withSrc = makeImage( true );
withoutSrc = makeImage( false );
Tests:
  • Creation with src

     
    makeImage( true );
  • Creation without src

     
    makeImage( false );
  • Clone with src

     
    withSrc.cloneNode();
  • Clone without src

     
    withoutSrc.cloneNode();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Creation with src
    Creation without src
    Clone with src
    Clone without src

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Creation with src 135330.9 Ops/sec
Creation without src 2163599.0 Ops/sec
Clone with src 146972.9 Ops/sec
Clone without src 2435296.5 Ops/sec