mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-02-04 09:57:54 +00:00
Docs: Update benchmark for moonshotai/kimi-k2.5
This commit is contained in:
26
tests/1_dijkstra/outputs/moonshotai_kimi-k2.5.js
Normal file
26
tests/1_dijkstra/outputs/moonshotai_kimi-k2.5.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const findShortestPath = async (g, s, e) => {
|
||||
const { default: Q } = await import('https://esm.sh/js-priority-queue');
|
||||
const d = {}, q = new Q({ comparator: (a, b) => a[0] - b[0] });
|
||||
|
||||
for (const k in g) d[k] = 1/0;
|
||||
d[s] = 0;
|
||||
q.queue([0, s]);
|
||||
|
||||
while (q.length) {
|
||||
const [c, u] = q.dequeue();
|
||||
if (u === e) return c;
|
||||
if (c > d[u]) continue;
|
||||
for (const v in g[u] || {}) {
|
||||
const t = c + g[u][v];
|
||||
if (t < d[v]) {
|
||||
d[v] = t;
|
||||
q.queue([t, v]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1/0;
|
||||
};
|
||||
export default findShortestPath;
|
||||
// Generation time: 56.044s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user