Replace All vs Split/Join (v50)

Revision 50 of this benchmark created on


Setup

str = "Test   test test   test..."

Test runner

Ready to run.

Testing in
TestOps/sec
split & join
str.split("SPACE").join("");
ready
replace
str.replace(/SPACE/g, '');
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.