split/join vs regex replace (v16)

Revision 16 of this benchmark created on


Preparation HTML

<script>
  var str = '8=FIX.4.2|9=242|35=MDF|1=XLIS|2=CS|3=BCP|4=L|5=9466744|6=0.109000|9=0.109000|10=10000|11=115600|12=0.0000|13=164337688|14=0.109000|15=0.112000|16=0.108000|18=0.109000|19=0.110001|22=1062|25=0.109000|26=3555747|34=2013-10-15 10:58:42.858|36=0|38=PTBCP0AM0007|10=000|',
      delim = '|';
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
SPLIT
str.split(' ').join(delim)
ready
REGEX
str.replace(/ /g, delim)
ready

Revisions

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