Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
image from ImageDecoder vs native image src
(version: 2)
Comparing performance of:
from ImageDecoder vs from native
Created:
one year ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
from ImageDecoder
(async () => { let init = { type: "image/png", data: imageByteStream, }; const resp = await fetch('https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'); const imageDecoder = new ImageDecoder({ data: resp.body, type: "image/png" }); const frame = await decoder.decode(); const bitmap = frame.image; const image = new Image(); image.src = URL.createObjectURL(bitmap); })();
from native
const img = new Image(); img.src = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png';
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
from ImageDecoder
from native
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Mobile/15E148 Safari/604.1
Browser/OS:
Mobile Safari 18 on iOS 18.4
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
from ImageDecoder
468063.9 Ops/sec
from native
1082.9 Ops/sec
Related benchmarks:
Assigning new variable
Benchmark GTM
Luxon vs
undefined to boolean
JS Variable Performance (const vs let vs var)
js mul vs pow
test early return
Test direct and destructuring performances
Test intArrya
Comments
Confirm delete:
Do you really want to delete benchmark?