Docs: Update benchmark for z-ai/glm-5

This commit is contained in:
github-actions[bot]
2026-02-12 00:32:22 +00:00
parent bff6d5226e
commit 91aa46a299
12 changed files with 216 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
async function findShortestPath(graph, start, end) {
const { default: PQ } = await import('https://cdn.skypack.dev/js-priority-queue');
const dist = { [start]: 0 };
const pq = new PQ({ comparator: (a, b) => a.w - b.w });
pq.queue({ v: start, w: 0 });
while (pq.length) {
const { v, w } = pq.dequeue();
if (v === end) return w;
if (w > (dist[v] ?? Infinity)) continue;
for (const n in graph[v]) {
const d = w + graph[v][n];
if (d < (dist[n] ?? Infinity)) {
dist[n] = d;
pq.queue({ v: n, w: d });
}
}
}
return Infinity;
}
export default findShortestPath;
// Generation time: 31.439s
// Result: PASS