Convert to string using template literal vs String()

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Template Literal on integer
`${5}`
ready
String() on integer
String(5)
ready
Template Literal on float
`${5.55}`
ready
String() on float
String(5.55)
ready
Template Literal on string
`${'foo'}`
ready
String() on string
String('foo')
ready

Revisions

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