Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Benchmark 3: UI Integration (inline script execution)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Browser:
Chrome 146
Operating system:
Windows
Device Platform:
Desktop
Date tested:
27 days ago
Test name
Executions per second
Test 1 — eval (UI script):
179579.0 Ops/sec
Test 2 — new Function (UI script, no cache):
198166.2 Ops/sec
Test 3 — new Function (UI script, cached):
264771.3 Ops/sec
Test 4 — script tag (UI script):
47246.5 Ops/sec
HTML Preparation code:
var uiScript = 'var x = document.createElement("div"); x.id = "bench_test"; document.body.appendChild(x); document.body.removeChild(x);'; var cachedUiFn = new Function(uiScript);
Script Preparation code:
var uiScript = 'var x = document.createElement("div"); x.id = "bench_test"; document.body.appendChild(x); document.body.removeChild(x);'; var cachedUiFn = new Function(uiScript);
Tests:
Test 1 — eval (UI script):
eval(uiScript);
Test 2 — new Function (UI script, no cache):
new Function(uiScript)();
Test 3 — new Function (UI script, cached):
cachedUiFn();
Test 4 — script tag (UI script):
var s = document.createElement('script'); s.textContent = uiScript; document.head.appendChild(s); document.head.removeChild(s);