Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
test assign path
(version: 2)
Comparing performance of:
actual vs futuro
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:
actual
var host = window.location.hostname; var path_js; if (host.indexOf('www.sport.es') !== -1) { path_js = 'https:/host/cds-statics/SPO/js/'; } else if (host.indexOf('www.elperiodico.com') !== -1) { path_js = 'https://host/cds-statics/EPC/js/'; } else if (host.indexOf('www.epe.es') !== -1) { path_js = 'https://host/cds-statics/EPE/js/'; } else if (host.match(/woman.elperiodico.com|viajar.elperiodico.com|www.elperiodico.cat|www.stilo.es|www.codigonuevo.com|neomotor.epe.es/)) { path_js = 'https://host/js/'; } else { path_js = 'https://host/estaticos/notificaciones-push/'; } var el = document.createElement('script') el.src = path_js + 'sdk.min.js' el.async = 'true' el.addEventListener('load', function () { indigitall.init({ appKey: '123', urlDeviceApi: 'https://eu2.device-api.indigitall.com/v1', workerPath: path_js + 'worker.min.js', requestLocation: false, onInitialized: function () { window.dispatchEvent(new Event('indigitallReady')) } }) }) document.head.appendChild(el)
futuro
var host = window.location.hostname; var paths = { 'www.sport.es': 'cds-statics/SPO/js/', 'www.elperiodico.com': 'cds-statics/EPC/js/', 'www.epe.es': 'cds-statics/EPE/js/' }; var regexPaths = [ /woman.elperiodico.com/, /viajar.elperiodico.com/, /www.elperiodico.cat/, /www.stilo.es/, /www.codigonuevo.com/, /neomotor.epe.es/ ]; var path_js = 'estaticos/notificaciones-push/'; // Default path if (paths[host]) { path_js = paths[host]; } else if (regexPaths.some(function (regex) { return regex.test(host); })) { path_js = 'js/'; } path_js = 'https://' + host + '/' + path_js; var el = document.createElement('script'); el.src = path_js + 'sdk.min.js'; el.async = true; el.addEventListener('load', function () { indigitall.init({ appKey: '123', urlDeviceApi: 'https://eu2.device-api.indigitall.com/v1', workerPath: path_js + 'worker.min.js', requestLocation: false, onInitialized: function () { window.dispatchEvent(new Event('indigitallReady')); } }); }); document.head.appendChild(el);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
actual
futuro
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser/OS:
Chrome 133 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
actual
147804.1 Ops/sec
futuro
129021.6 Ops/sec
Related benchmarks:
Assigning new variable
test cross_domain
PIMEc TEST
Luxon vs
String .search vs .includes
undefined to boolean
js mul vs pow
Random Generator Speed
test early return
Comments
Confirm delete:
Do you really want to delete benchmark?