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

Function top

scripts/rubi/triage-ch6.ts:133–134  ·  view source on GitHub ↗
(m: Map<string, number>, n = 15)

Source from the content-addressed store, hash-verified

131 }
132
133 const top = (m: Map<string, number>, n = 15) =>
134 [...m.entries()].sort((a, b) => b[1] - a[1]).slice(0, n);
135
136 console.log(`SOLVED ${solved}/${slice.length}`);
137 console.log(`NO RULE ATTEMPT (dispatch/reduction gap): ${noAttempt}`);

Callers 1

mainFunction · 0.85

Calls 2

sliceMethod · 0.65
entriesMethod · 0.65

Tested by

no test coverage detected