Script Preparation code:
x
 
var img = new window.Image()
var imageBitmap
const canvas = document.createElement('canvas')
canvas.width = 640
canvas.height = 480
var ctx = canvas.getContext('2d')
var promise = new Promise(resolve => {
    img.addEventListener('load', function() {
        window.createImageBitmap(img)
            .then(function(bitmap) {
                imageBitmap = bitmap
                resolve()
            })
    })
})
img.src = 'https://1.bp.blogspot.com/-52MtzD0GfX0/WvP52CL1WjI/AAAAAAAAOVw/_OpK4JHeWK01d-7IiZ6vzojYGhXqLRXrACLcBGAs/s1600/EMxediL.jpg';
Tests:
  • Image

     
    promise.then(()=> ctx.drawImage(img, 0, 0));
  • Bitmap

     
    promise.then(()=> ctx.drawImage(imageBitmap, 0, 0));
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Image
    Bitmap

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Linux; Android 10; Titan) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Mobile Safari/537.36
Chrome Mobile 96 on Android
View result in a separate tab
Test name Executions per second
Image 1246766.1 Ops/sec
Bitmap 1316210.0 Ops/sec