Replace All vs Split/Join (v42)

Revision 42 of this benchmark created on


Setup

str = "Test abc test abc test abc test abc test abc test"

Test runner

Ready to run.

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

Revisions

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