kinkin-test

Benchmark created on


Preparation HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <div>
    <img id="source" width="48" height="48">
</div>
</body>
</html>

Test runner

Ready to run.

Testing in
TestOps/sec
canvas
const canvas = document.getElementById('canvas');
    const ctx = canvas.getContext('2d');

    const image = new Image(); // Using optional size for image
    image.onload = drawImageActualSize; // Draw when image has loaded

    // Load an image of intrinsic size 300x227 in CSS pixels
    image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAALRJREFUaEPtl8EKgCAUBPXLoy+vQ7cQYdkVeTKd27Vmnkm9Fb968edvvMBugxjAgEmAETIB2nEM2AjNgqMNPCacdHwIe2aAFwgrkA2E119Td/QmXoMs3IqBMFC5DgMysnBgZuAKr+XW3aMCTmIXq5CXT+LyIyTA2Xcrn9F97L+VMYABk8DRI8Q/sTkd/7h8Epc3EAa4pu7oTbwGWbgVA2Ggch0GZGThAAbCQOU6DMjIwoHyBl6tDgoxMgGdcgAAAABJRU5ErkJggg=="
    function drawImageActualSize() {
        // Will draw the image as 300x227, ignoring the custom size of 60x45
        // given in the constructor
        ctx.drawImage(this, 0, 0);

        // To use the custom size we'll have to specify the scale parameters
        // using the element's width and height properties - lets draw one
        // on top in the corner:
    }
ready
src
const source = document.getElementById('source');
    source.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAALRJREFUaEPtl8EKgCAUBPXLoy+vQ7cQYdkVeTKd27Vmnkm9Fb968edvvMBugxjAgEmAETIB2nEM2AjNgqMNPCacdHwIe2aAFwgrkA2E119Td/QmXoMs3IqBMFC5DgMysnBgZuAKr+XW3aMCTmIXq5CXT+LyIyTA2Xcrn9F97L+VMYABk8DRI8Q/sTkd/7h8Epc3EAa4pu7oTbwGWbgVA2Ggch0GZGThAAbCQOU6DMjIwoHyBl6tDgoxMgGdcgAAAABJRU5ErkJggg=="
ready

Revisions

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