Docs: Update benchmark for openrouter/pony-alpha

This commit is contained in:
github-actions[bot]
2026-02-06 20:56:45 +00:00
parent 76e2886475
commit 4be9446973
10 changed files with 199 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
const findShortestPath = async (graph, start, end) => {
const { default: PriorityQueue } = await import('https://esm.sh/js-priority-queue');
const dist = { [start]: 0 };
const pq = new PriorityQueue({ 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;
const edges = graph[v] || {};
for (const n in edges) {
const nd = w + edges[n];
if (nd < (dist[n] ?? Infinity)) {
dist[n] = nd;
pq.queue({ v: n, w: nd });
}
}
}
return Infinity;
};
export default findShortestPath;
// Generation time: 136.164s
// Result: PASS