Replace All vs Split/Join (v5)

Revision 5 of this benchmark created on


Setup

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

Test runner

Ready to run.

Testing in
TestOps/sec
split & join
str.split("abc").join("<span class='test'>");
ready
replace
str.replace(/abc/g, "<span class='test'>");
ready

Revisions

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