Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
unescape vs replace function
(version: 0)
Comparing performance of:
unescape vs replace func
Created:
2 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var count = 1000;
Tests:
unescape
for (var i = 0; i < count; i++) { unescape(encodeURI("日")); }
replace func
for (var i = 0; i < count; i++) { encodeURI("日").replace(/%[\da-f]{2}/gi, (char) => String.fromCodePoint(parseInt(char.replace(/%/, ""), 16))); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
unescape
replace func
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
2 years ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Browser/OS:
Chrome 121 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
unescape
3135.9 Ops/sec
replace func
1067.7 Ops/sec
Related benchmarks:
Really simple Ramda vs. Lodash
Ramda (/w transducer) vs. Lodash
Ramda vs. Lodash vs. Native array methods
Ramda vs. Lodash vs. Immutable vs. Native array methods
List operations: Ramda vs. Lodash vs. Immutable vs. Native array methods
Comments
Confirm delete:
Do you really want to delete benchmark?