Skip to main content
100%

chuhai async

✓ Published0🌍 Public
HHypercubed
Last edited Jun 3, 2016
Created on Jun 2, 2016

This example demonstrates how asynchronous timing errors in benchmark code can skew results, contrasting a correct benchmark with a buggy variant. The visualization, generated by the `chuhai` and `blue-tape` libraries, compares operations per second for `nextTick`, `setTimeout`, and `setImmediate`, alongside a synchronous `max` baseline. In the buggy version, shared variable mutations inside asynchronous callbacks produce incorrect factorial calculations, as shown by failed assertions. The rendered bar chart highlights performance differences, with `nextTick` fastest when correct, while the buggy results falsely elevate `setImmediate` due to the timing mistakes.

AI-generated description
MIT Licensed

Similar vizzes