SUM = {
const iters = 1_000
let then = performance.now()
for (let i=0;i<iters;i++){
const unique = df.rollup({x: op.sum("VAL")})
}
let now = performance.now()
const aqPerf = now - then
then = performance.now()
for (let i=0; i<iters;i++){
let sum = 0;
for (let i=0;i<col.length;i++){
sum += col[i].VAL
}
}
now = performance.now()
const vanillaPerf = now - then
then = performance.now()
for (let i=0; i<iters;i++){
const sum = await client.table(`SELECT SUM(val) FROM dt`)
}
now = performance.now()
const duckPerf = now - then
return {
aqPerf,
duckPerf,
vanillaPerf
}
}