Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Reverse Performance
(version: 0)
Comparing performance of:
Test with lists vs Test with for loop
Created:
2 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
const reverse1 = text => text.split('').reverse().join(''); const reverse2 = (text) => { let result = ''; for (let i = text.length - 1; i >= 0; i--) { result = `${result}${text[i]}`; } return result; }
Tests:
Test with lists
var tmp = reverse1('Hello this is a test!');
Test with for loop
var tmp = reverse2('Hello this is a test!');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Test with lists
Test with for loop
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?