concat vs + vs join vs push (v23)

Revision 23 of this benchmark created by tuanquynet on


Description

How to concat strings faster.

Setup

var list_arr = [];
    var list_str = ';';

Test runner

Ready to run.

Testing in
TestOps/sec
push
list_arr.push('abc');
ready
+ & join
list_str = list_str + 'abc;';
ready

Revisions

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