Great work Samantha.
const icon = 'π'; timeInLoop("template literal", 1e6, () => `hi ${icon}`); timeInLoop("plus operator", 1e6, () => "hi " + icon); timeInLoop("concat func", 1e6, () => ''.concat('hi ', icon)); timeInLoop("arr join", 1e6, () => ['hi', icon].join(' ')); /* @perftests run 1 million times each template literal: 1e+6: 14.575ms plus operator: 1e+6: 53.776ms concat func: 1e+6: 391.723ms arr join: 1e+6: 681.97ms */
gist.github.com/funfunction/91b587...
Great! thanks for the performance test π
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great work Samantha.
Performance Test
Source Code for timeInLoop func
gist.github.com/funfunction/91b587...
Great! thanks for the performance test π