MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / benchmark

Function benchmark

test/compute-engine/compile-performance.test.ts:27–34  ·  view source on GitHub ↗
(fn: () => any, iterations: number)

Source from the content-addressed store, hash-verified

25 *
26 * The execution-speed comparisons further down (compiled runner vs
27 * interpreter) are still timed, because there is no counter that can stand in
28 * for "the generated code runs faster than the interpreter". They compare two
29 * measurements taken back to back in the same process, so load affects both
30 * sides, and their observed margins are one to two orders of magnitude.
31 */
32
33describe('COMPILATION PERFORMANCE', () => {
34 const verbose =
35 process.env.COMPILE_PERF_VERBOSE === '1' ||
36 process.env.BENCH_VERBOSE === '1' ||
37 process.env.VERBOSE === '1';

Callers 1

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected