Docs: Update benchmark for anthropic/claude-sonnet-4.6

This commit is contained in:
github-actions[bot]
2026-02-17 22:10:27 +00:00
parent ceeeb7d186
commit 79886a435d
12 changed files with 350 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
const findShortestPath = async (graph, start, end) => {
const { default: PriorityQueue } = await import(
"https://cdn.jsdelivr.net/npm/js-priority-queue@0.1.5/priority-queue.js"
);
const pq = new PriorityQueue({ comparator: (a, b) => a[0] - b[0] });
const dist = Object.fromEntries(Object.keys(graph).map((n) => [n, Infinity]));
dist[start] = 0;
pq.queue([0, start]);
while (pq.length) {
const [d, u] = pq.dequeue();
if (d > dist[u]) continue;
if (u === end) return d;
for (const [v, w] of Object.entries(graph[u] ?? {})) {
const nd = d + w;
if (nd < dist[v]) {
dist[v] = nd;
pq.queue([nd, v]);
}
}
}
return dist[end];
};
export default findShortestPath;
// Generation time: 4.396s
// Result: FAIL