Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
document.fonts
(version: 0)
Comparing performance of:
document.fonts.check vs document.fonts.forEach
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
for (let i = 0; i < 100; i++) { const font = new FontFace('font-' + i, '') document.fonts.add(font) } function isFontLoaded(fontFamily) { document.fonts.forEach((e) => { if (e.family === fontFamily) { return true } }) return false }
Tests:
document.fonts.check
document.fonts.check('16px Open Sans')
document.fonts.forEach
isFontLoaded('Open Sans')
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
document.fonts.check
document.fonts.forEach
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
length111
String typeof in High Frequency
Function typeof in High Frequency
sin cos test
String vs template string
Comments
Confirm delete:
Do you really want to delete benchmark?