Docs: Update benchmark for anthropic/claude-sonnet-5 EFF:high

This commit is contained in:
github-actions[bot]
2026-07-01 22:16:12 +00:00
parent 0c2cd5e395
commit 48dfa6cd44
12 changed files with 441 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
async function findShortestPath(graph, start, end) {
const { default: PriorityQueue } = await import('https://esm.sh/js-priority-queue@0.1.5');
if (!(start in graph) || !(end in graph)) return Infinity;
const dist = Object.fromEntries(Object.keys(graph).map(n => [n, Infinity]));
dist[start] = 0;
const pq = new PriorityQueue({ comparator: (a, b) => a.dist - b.dist });
pq.queue({ node: start, dist: 0 });
const visited = new Set();
while (pq.length > 0) {
const { node, dist: d } = pq.dequeue();
if (visited.has(node)) continue;
visited.add(node);
if (node === end) return d;
for (const [neighbor, weight] of Object.entries(graph[node] ?? {})) {
const newDist = d + weight;
if (newDist < dist[neighbor]) {
dist[neighbor] = newDist;
pq.queue({ node: neighbor, dist: newDist });
}
}
}
return dist[end];
}
export default findShortestPath;
// Generation time: 10.596s
// Result: PASS