Replace All vs Split/Join (v36)

Revision 36 of this benchmark created by my name on


Setup

str = "Test abc test test abc test..."
    REGEX = /abc/g

Test runner

Ready to run.

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

Revisions

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