JS Benchmark

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:

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.