After conducting a benchmark on both jsperf.com and jsben.ch, I noticed that they are providing significantly different results.
Here are the links to the benchmarks:
- JSPerf: https://jsperf.com/join-vs-template-venryx
- JSBench:
Even though the code blocks used in both benchmarks are identical, the performance outcomes vary greatly. On jsperf, block 1 is reported to be "61% slower" than the fastest, while on jsbench, it's only 32% slower than the fastest option.
This inconsistency is perplexing as one would expect benchmark sites to yield similar results with minimal variation.
Due to these discrepancies, I am unable to draw a definitive conclusion regarding which method is the most efficient.
EDIT
I have expanded the list of benchmarks for further analysis:
While I cannot definitively determine the best performing option, I recommend avoiding jsben.ch due to missing crucial information such as the number of runs, error margin, and operations per second, which are essential for accurate performance assessment and comparison across benchmark sites and browsers.
(Currently, is my preferred choice.)