Generate string from repeated characters (String repeat vs String padStart vs String padEnd)

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
String repeat
const result = 'a'.repeat(10)
ready
String padStart
const result = ''.padStart(10, 'a')
ready
String padEnd
const result = ''.padEnd(10, 'a')
ready

Revisions

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