split/join prepared regex vs inline (v18)

Revision 18 of this benchmark created by phillips1012 on


Description

Forcibly de-tuned the benchmark to make Chrome spit out a marginally representative result.

Setup

var string = 'coucou/comment/ca/va/bien/le/monde';
    var re = /\/+/g;

Test runner

Ready to run.

Testing in
TestOps/sec
inline
string.replace(/\/+/g, '.');
ready
prepared
string.replace(re, '.');
ready

Revisions

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