Test name | Executions per second |
---|---|
.toString() | 106844.7 Ops/sec |
String() | 62308.5 Ops/sec |
<!--your preparation HTML code goes here-->
var url = new URL("http://localhost/?search=term");
let urls = [];
for(let i = 0; i < 100; ++i) {
urls.push(url.toString());
}
let urls = [];
for(let i = 0; i < 100; ++i) {
urls.push(String(url));
}