Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
img src slowness
Creating image tags with/without an src attribute with a data URI.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Browser:
Firefox 115
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Creation with src
56188.1 Ops/sec
Creation without src
1711781.6 Ops/sec
Clone with src
58786.4 Ops/sec
Clone without src
2068621.1 Ops/sec
Script Preparation code:
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();