Docs: Update benchmark for google/gemini-3.5-flash

This commit is contained in:
github-actions[bot]
2026-05-19 23:06:38 +00:00
parent a037a78102
commit 1dfaf490cd
12 changed files with 389 additions and 0 deletions

View File

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