Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
IDL-Attributes vs URI.js vs native URL vs webcomponents/url
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/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
IDL-Attributes
543798.9 Ops/sec
URI.js
252097.8 Ops/sec
new URL()
948301.9 Ops/sec
webcomponents/URL
946155.8 Ops/sec
HTML Preparation code:
<script>forceJURL = true;</script> <script src="https://cdnjs.cloudflare.com/ajax/libs/URI.js/1.19.1/URI.js"></script> <script src="https://raw.githubusercontent.com/webcomponents/URL/v0.7.3/url.js"></script>
Tests:
IDL-Attributes
var a = document.createElement('a'); a.href = 'http://www.example.org/path/to/file.html?some=param#hash'; a.pathname = '/path/to/other/file.html'; a.href + '';
URI.js
var a = new URI('http://www.example.org/path/to/file.html?some=param#hash'); a.pathname('/path/to/other/file.html'); a.href();
new URL()
var u = new URL('http://www.example.org/path/to/file.html?some=param#hash'); u.pathname = '/path/to/other/file.html'; u.toString();
webcomponents/URL
var u = new URL('http://www.example.org/path/to/file.html?some=param#hash'); u.pathname = '/path/to/other/file.html'; u.toString();