string literals, concatenation, and templates

Benchmark created on


Description

compare performance of static literal and concat vs template

Test runner

Ready to run.

Testing in
TestOps/sec
Single quote - static
var test = 'Hello World!'
ready
Double quote - static
var test = "Hello World!"
ready
Backtick - static
var test = `Hello World!`
ready
Single quote - concat
var noun = 'World'
var test = 'Hello' + noun + '!'
ready
Double quote - concat
var noun = "World"
var test = "Hello" + noun + "!"
ready
Backtick - concat
var noun = `World`
var test = `Hello ${noun}!`
ready

Revisions

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