test_reg_replace_empty (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
無空白文字 indexOf
var e="aa";
while(e.indexOf(" ")>=0){e=e.replace(" ","");}
ready
有空白文字 indexOf
var e="a a";
while(e.indexOf(" ")>=0){e=e.replace(" ","");}
ready
無空白文字 replace all
var e="aa";
e=e.replace(/[\s]+/g,"");
ready
有空白文字 replace all
var e="a a";
e=e.replace(/[\s]+/g,"");
ready

Revisions

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