mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-04-27 19:52:14 +00:00
Docs: Update benchmark for deepseek/deepseek-v4-pro
This commit is contained in:
24
tests/1_dijkstra/outputs/deepseek_deepseek-v4-pro.js
Normal file
24
tests/1_dijkstra/outputs/deepseek_deepseek-v4-pro.js
Normal file
@@ -0,0 +1,24 @@
|
||||
async function findShortestPath(g,s,e){
|
||||
const {default:P}=await import('https://esm.sh/js-priority-queue');
|
||||
const d={};
|
||||
for(let k in g)d[k]=Infinity;
|
||||
d[s]=0;
|
||||
const q=new P({comparator:(a,b)=>a.w-b.w});
|
||||
q.queue({n:s,w:0});
|
||||
while(q.length){
|
||||
const {n,w}=q.dequeue();
|
||||
if(n===e)return w;
|
||||
if(w>d[n])continue;
|
||||
for(const t in g[n]){
|
||||
const w2=w+g[n][t];
|
||||
if(w2<d[t]){
|
||||
d[t]=w2;
|
||||
q.queue({n:t,w:w2});
|
||||
}
|
||||
}
|
||||
}
|
||||
return Infinity
|
||||
}
|
||||
export default findShortestPath;
|
||||
// Generation time: 45.490s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user