UNPKG

iso-bench

Version:

Small benchmark library focused in avoiding optimization/deoptimization pollution between tests by isolating them.

4 lines (3 loc) 343 B
import { AsyncSetupCallback, AsyncCallback } from "./IsoBench"; export declare function getDiff(cycles: number, callback: (setupData?: unknown) => void, setup?: (() => unknown) | null): number; export declare function getAsyncDiff<T>(cycles: number, callback: AsyncCallback | AsyncSetupCallback<T>, setup?: (() => T) | null): Promise<number>;