splitvsregex

JavaScript performance comparison

Test case created

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
split
var path = ",5130c2879f95454015000001,5130c3049f95454015000002,";
var old_path = ",5130c2879f95454015000001,";
var new_path = ",5130c2879f95454015000004,";
var result = "";

result = path.split(old_path).join(new_path);
pending…
replace
var path = ",5130c2879f95454015000001,5130c3049f95454015000002,";
var old_path = ",5130c2879f95454015000001,";
var new_path = ",5130c2879f95454015000004,";
var result = "";

result = path.replace(old_path, new_path);
pending…

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

Compare results of other browsers

0 comments

Add a comment