string constructor vs template literals

Benchmark created on


Setup

const obj = { attempts: 234 };

Test runner

Ready to run.

Testing in
TestOps/sec
constructor
const result = String(obj.attempts);
ready
template literals
const result = `${obj.attempts}`;
ready

Revisions

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