concat vs push

Benchmark created by ratkinson on


Setup

var doubleclick = {};
    doubleclick.uid = 'test';
    doubleclick.tid = 'tset';

Test runner

Ready to run.

Testing in
TestOps/sec
concat
var src = 'https://fls.doubleclick.net/activityi;src=3390526;type=sales705;cat=6pmco330;qty=1;' +
          'cost=${order.merchandiseSubtotal};' +       // Revenue
          'ord=${orderId};' +                          // Order ID
          'u1=${order.shippingAddress.postalCode};' +  // Zip
          'u2=${order.shippingAddress.state};' +       // State
          'u3=' + doubleclick.uid + ';' +              // 3P Customer ID
          'u4=' + doubleclick.tid + ';' +              // 3P Session ID
          'u5=${checkoutCommand.customerStatus};' +    // Customer Type
          'u6=${qty};' +                               // Quantity
          'u7=${sku};' +                               // SKU
          'u8=${brand};' +                             // product brand name
          'u9=${category}?';                           // Category
 
ready
array
var src = ['https://fls.doubleclick.net/activityi;src=3390526;type=sales705;cat=6pmco330;qty=1;',
          'cost=${order.merchandiseSubtotal};',
          'ord=${orderId};',
          'u1=${order.shippingAddress.postalCode};',
          'u2=${order.shippingAddress.state};',
          'u3=', doubleclick.uid, ';',
          'u4=', doubleclick.tid, ';',
          'u5=${checkoutCommand.customerStatus};',
          'u6=${qty};',
          'u7=${sku};',
          'u8=${brand};',
          'u9=${category}?'];
 
ready

Revisions

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

  • Revision 1: published by ratkinson on