MCPcopy Index your code
hub / github.com/nodejs/node / depth1

Function depth1

benchmark/timers/immediate.js:47–58  ·  view source on GitHub ↗
(N)

Source from the content-addressed store, hash-verified

45
46// setImmediate tail recursion, 1 argument
47function depth1(N) {
48 let n = 0;
49 bench.start();
50 setImmediate(cb, 1);
51 function cb(a1) {
52 n++;
53 if (n === N)
54 bench.end(N);
55 else
56 setImmediate(cb, 1);
57 }
58}
59
60// Concurrent setImmediate, 0 arguments
61function breadth(N) {

Callers 1

mainFunction · 0.85

Calls 2

setImmediateFunction · 0.50
startMethod · 0.45

Tested by

no test coverage detected