Unlisted
Edited
Jun 24, 2023
Insert cell
Insert cell
a = new Uint32Array(Array.from({ length: 10e6 }, () => 1e3 * Math.random()))
Insert cell
{
console.time("sum");
let sum = 0;
let n = a.length;
for (let i = 0; i < n; i++) sum += a[i];
console.timeEnd("sum");
return sum;
}
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