String literals vs String concat

Benchmark created on


Setup

const measurement = 'product';
const tags = 'home=123456,zone=12';
const fields = 'insideTemperature=22i,humidity=40.5';
const timestamp = '1234567890123456'; 

Test runner

Ready to run.

Testing in
TestOps/sec
string literal
const point = `${measurement},${tags} ${fields} ${timestamp}`;
ready
string concat
const point = measurement + ',' + tags + ' ' + fields + ' ' + timestamp;
ready

Revisions

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