Published
Edited
Apr 17, 2020
Insert cell
Insert cell
Insert cell
Insert cell
testAmount = 5000
Insert cell
data = {
const req = await fetch('https://jsonplaceholder.typicode.com/users');
return req.json();
}
Insert cell
function runTest(testFunc, ...testArg) {
let sum = 0;
for (let i = 0; i < testAmount; i++) {
const timeBefore = performance.now();
testFunc(...testArg);
const timeAfter = performance.now();
sum += timeAfter - timeBefore;
}

return sum / testAmount;
}
Insert cell
lodash = require('lodash')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more