Docs: Update benchmark for minimax/minimax-m2.5

This commit is contained in:
github-actions[bot]
2026-02-12 16:36:02 +00:00
parent 4eff5b0809
commit 42bc15a261
12 changed files with 228 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
async function findShortestPath(graph, start, end) {
if (!(start in graph) || !(end in graph)) return Infinity;
if (start === end) return 0;
const { default: PriorityQueue } = await import('https://cdn.skypack.dev/js-priority-queue');
const pq = new PriorityQueue({ comparator: (a, b) => a.w - b.w });
const dist = {};
for (const n in graph) dist[n] = Infinity;
dist[start] = 0;
pq.queue({ n: start, w: 0 });
while (pq.length) {
const { n, w } = pq.dequeue();
if (w !== dist[n]) continue;
if (n === end) return w;
for (const [nb, wgt] of Object.entries(graph[n] || {})) {
const ndist = w + wgt;
if (ndist < dist[nb]) {
dist[nb] = ndist;
pq.queue({ n: nb, w: ndist });
}
}
}
return Infinity;
}
export default findShortestPath;
// Generation time: 64.656s
// Result: PASS