new Image vs. createElement('img')

Benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
new Image
var cacheImage = new Image();
cacheImage.src = 'http://static.top.de/1.10/img/common/logo.png';
ready
createElement
var cacheImage = document.createElement('img');
cacheImage.src = 'http://static.top.de/1.10/img/common/logo.png';
ready
jQuery
jQuery("<img>").attr("src", 'http://static.top.de/1.10/img/common/logo.png');
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.