String.prototype.startsWith performance
var iterations = 2000000;
var s = "hello world";s.startsWith("hello")s.startsWith("hello")s.startsWith("hello")| Browser | Time |
|---|---|
1st | 1.00 ms |
2nd | 12.90 ms |
3rd | 20.40 ms |
4th | 66.00 ms |
Median of 5 trials ร 2,000,000 iterations.