await block.pow()
const end = performance.now()
times.push(end - start)
- works.innerHTML += `${block.work}<br/>`
+ works.innerHTML += `${block.work} (${end - start} ms)<br/>`
console.log(block.work)
}
let sum = 0, reciprocals = 0, product = 1, count = times.length
})
const end = performance.now()
times.push(end - start)
- works.innerHTML += `${work}<br/>`
+ works.innerHTML += `${work} (${end - start} ms)<br/>`
console.log(work)
}
let sum = 0, reciprocals = 0, product = 1, count = times.length
product *= times[i]
}
const t = document.getElementById('times')
- t.innerHTML = `Total: ${sum} ms<br/>
+ t.innerHTML += `Total: ${sum} ms<br/>
Average: ${sum / count} ms<br/>
Harmonic: ${count / reciprocals} ms<br/>
-Geometric: ${Math.pow(product, 1 / count)} ms`
+Geometric: ${Math.pow(product, 1 / count)} ms<br/>`
})()
</script>