Define HTML + setup code, then benchmark Case 1 vs Case 2.
Setup HTML (add <script> tags for external scripts)
Setup JS (runs before each case)
Case 1
Case 2
Results
Why build another JS benchmark?
I needed:
A way to have initial HTML setup to test out DOM manipulations
Specify the number of iterations to run
A way to share the results quickly via URL
Most existing benchmarks have only 2 out of 3 required features. jsbench.me has HTML setup but no way to specify the number of iterations. jsbenchmark.com has iterations but no HTML, etc.