Published
Edited
Mar 14, 2021
3 forks
3 stars
Insert cell
Insert cell
Insert cell
function benchmark(b) {
const values = Float64Array.from({ length: N }, d3.randomNormal(2, 1));

b.tic(); // start timing

for (let i = 0; i < b.iterations; i++) {
const sum = values.reduce((a, b) => a + b, 0);
}

b.toc(); // end timing

b.end(); // finish the benchmark
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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