Docs: Update benchmark for google/gemini-3.8-flash EFF:high

This commit is contained in:
github-actions[bot]
2026-09-08 14:30:30 +00:00
parent 16a6e49ab2
commit aab29b41d9
12 changed files with 407 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
export async function findShortestPath(graph, start, end) {
const { default: PriorityQueue } = await import('https://esm.sh/js-priority-queue');
const dist = new Map([[start, 0]]);
const pq = new PriorityQueue({ comparator: (a, b) => a[1] - b[1] });
pq.queue([start, 0]);
while (pq.length) {
const [node, cost] = pq.dequeue();
if (node === end) return cost;
if (cost > (dist.get(node) ?? Infinity)) continue;
for (const [neighbor, weight] of Object.entries(graph[node] ?? {})) {
const nextCost = cost + weight;
if (nextCost < (dist.get(neighbor) ?? Infinity)) {
dist.set(neighbor, nextCost);
pq.queue([neighbor, nextCost]);
}
}
}
return Infinity;
}
export default findShortestPath;
// Generation time: 16.431s
// Result: PASS