Skip to content

Instantly share code, notes, and snippets.

View cyborgx37's full-sized avatar

John-David Bell cyborgx37

View GitHub Profile
@cyborgx37
cyborgx37 / test.js
Created May 9, 2022 19:07
Performance test between forEach and for of
function runTest_ForEach(a, b) {
const start = performance.now();
a.forEach(v => {
b.push(v * 2);
});
return performance.now() - start;
}
function runTest_ForOf(a, b) {