From f276121fb06e8d2abce8ce92999c2b3b51c96957 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Dec 2025 16:05:03 +0000 Subject: [PATCH] Docs: Update benchmark for openai/gpt-5.1-codex-max --- .../outputs/openai_gpt-5.1-codex-max.js | 9 +++++ .../outputs/openai_gpt-5.1-codex-max.js | 10 +++++ .../outputs/openai_gpt-5.1-codex-max.js | 22 +++++++++++ .../outputs/openai_gpt-5.1-codex-max.js | 22 +++++++++++ .../3_lis/outputs/openai_gpt-5.1-codex-max.js | 12 ++++++ .../outputs/openai_gpt-5.1-codex-max.js | 7 ++++ .../outputs/openai_gpt-5.1-codex-max.js | 8 ++++ .../outputs/openai_gpt-5.1-codex-max.js | 26 +++++++++++++ .../outputs/openai_gpt-5.1-codex-max.js | 38 +++++++++++++++++++ .../outputs/openai_gpt-5.1-codex-max.js | 10 +++++ .../outputs/openai_gpt-5.1-codex-max.js | 20 ++++++++++ 11 files changed, 184 insertions(+) create mode 100644 tests/10_scrypt_hash/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/11_geospatial/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/1_dijkstra/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/2_convex_hull/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/3_lis/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/4_transpiler/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/5_markdown_parser/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/6_csv_processor/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/7_scheduler/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/8_json_validator/outputs/openai_gpt-5.1-codex-max.js create mode 100644 tests/9_stream_visualizer/outputs/openai_gpt-5.1-codex-max.js diff --git a/tests/10_scrypt_hash/outputs/openai_gpt-5.1-codex-max.js b/tests/10_scrypt_hash/outputs/openai_gpt-5.1-codex-max.js new file mode 100644 index 0000000..6c654b9 --- /dev/null +++ b/tests/10_scrypt_hash/outputs/openai_gpt-5.1-codex-max.js @@ -0,0 +1,9 @@ +const enc=new TextEncoder() +async function hashPassword(p,s){ + const{default:scrypt}=await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/+esm') + const u=await scrypt(enc.encode(p),enc.encode(s),1024,8,1,32) + return[...u].map(x=>x.toString(16).padStart(2,'0')).join('') +} +export default hashPassword; +// Generation time: 12.207s +// Result: FAIL \ No newline at end of file diff --git a/tests/11_geospatial/outputs/openai_gpt-5.1-codex-max.js b/tests/11_geospatial/outputs/openai_gpt-5.1-codex-max.js new file mode 100644 index 0000000..0a1799b --- /dev/null +++ b/tests/11_geospatial/outputs/openai_gpt-5.1-codex-max.js @@ -0,0 +1,10 @@ +async function analyzeGPS(readings, boundary) { + const { point, booleanPointInPolygon, lineString, length } = await import('https://cdn.skypack.dev/@turf/turf') + const v = readings.filter(r => booleanPointInPolygon(point(r.loc), boundary, { ignoreBoundary: true })).sort((a, b) => a.ts - b.ts) + if (v.length < 2) return 0 + const l = lineString(v.map(r => r.loc)) + return +length(l, { units: 'kilometers' }).toFixed(2) +} +export default analyzeGPS; +// Generation time: 10.671s +// Result: PASS \ No newline at end of file diff --git a/tests/1_dijkstra/outputs/openai_gpt-5.1-codex-max.js b/tests/1_dijkstra/outputs/openai_gpt-5.1-codex-max.js new file mode 100644 index 0000000..809ef6c --- /dev/null +++ b/tests/1_dijkstra/outputs/openai_gpt-5.1-codex-max.js @@ -0,0 +1,22 @@ +async function findShortestPath(g,s,t){ + let {default:P}=await import('https://cdn.skypack.dev/js-priority-queue') + if(!(s in g)||!(t in g))return Infinity + let d={},u=new Set,q=new P({comparator:(a,b)=>a[0]-b[0]}) + Object.keys(g).forEach(k=>d[k]=Infinity) + d[s]=0 + q.queue([0,s]) + while(q.length){ + let [w,n]=q.dequeue() + if(u.has(n))continue + if(n===t)return w + u.add(n) + for(let m in g[n]){ + let nw=w+g[n][m] + if(nw v.x, v => v.y]); + const c = (o, p, q) => (p.x - o.x) * (q.y - o.y) - (p.y - o.y) * (q.x - o.x); + const d = []; + for (const p of b) { + while (d.length > 1 && c(d[d.length - 2], d[d.length - 1], p) <= 0) d.pop(); + d.push(p); + } + const e = []; + for (let i = b.length; i--;) { + const p = b[i]; + while (e.length > 1 && c(e[e.length - 2], e[e.length - 1], p) <= 0) e.pop(); + e.push(p); + } + return uniqWith([...d, ...e], isEqual); +} +export default findConvexHull; +// Generation time: 16.314s +// Result: PASS \ No newline at end of file diff --git a/tests/3_lis/outputs/openai_gpt-5.1-codex-max.js b/tests/3_lis/outputs/openai_gpt-5.1-codex-max.js new file mode 100644 index 0000000..884dc52 --- /dev/null +++ b/tests/3_lis/outputs/openai_gpt-5.1-codex-max.js @@ -0,0 +1,12 @@ +async function findLISLength(a){ + let {bisectLeft}=await import('https://cdn.jsdelivr.net/npm/d3-array@3') + let t=[] + for(let x of a){ + let i=bisectLeft(t,x) + t[i]=x + } + return t.length +} +export default findLISLength; +// Generation time: 8.286s +// Result: FAIL \ No newline at end of file diff --git a/tests/4_transpiler/outputs/openai_gpt-5.1-codex-max.js b/tests/4_transpiler/outputs/openai_gpt-5.1-codex-max.js new file mode 100644 index 0000000..c40261b --- /dev/null +++ b/tests/4_transpiler/outputs/openai_gpt-5.1-codex-max.js @@ -0,0 +1,7 @@ +export const renderTemplate=async(template,data)=>{ + const {default:Handlebars}=await import('https://cdn.jsdelivr.net/npm/handlebars@latest/+esm') + return Handlebars.compile(template)(data) +} +export default renderTemplate; +// Generation time: 4.362s +// Result: PASS \ No newline at end of file diff --git a/tests/5_markdown_parser/outputs/openai_gpt-5.1-codex-max.js b/tests/5_markdown_parser/outputs/openai_gpt-5.1-codex-max.js new file mode 100644 index 0000000..4ad6ec5 --- /dev/null +++ b/tests/5_markdown_parser/outputs/openai_gpt-5.1-codex-max.js @@ -0,0 +1,8 @@ +let md +const parseMarkdown = async s => { + md ||= (await import('https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js')).marked + return md.parse(s) +} +export default parseMarkdown; +// Generation time: 8.679s +// Result: PASS \ No newline at end of file diff --git a/tests/6_csv_processor/outputs/openai_gpt-5.1-codex-max.js b/tests/6_csv_processor/outputs/openai_gpt-5.1-codex-max.js new file mode 100644 index 0000000..01addee --- /dev/null +++ b/tests/6_csv_processor/outputs/openai_gpt-5.1-codex-max.js @@ -0,0 +1,26 @@ +async function processCSV(csv, o) { + const { csvParse } = await import('https://cdn.skypack.dev/d3-dsv'); + const { filterColumn, filterValue, groupBy, aggregateColumn, operation } = o; + const rows = csvParse(csv); + const m = new Map(); + for (const r of rows) { + if (r[filterColumn] == filterValue) { + const g = r[groupBy]; + let a = +r[aggregateColumn]; + if (isNaN(a)) a = 0; + const v = m.get(g) || { c: 0, s: 0 }; + v.c++; + v.s += a; + m.set(g, v); + } + } + const out = []; + for (const [k, v] of m) { + const result = operation === 'sum' ? v.s : operation === 'count' ? v.c : v.s / v.c; + out.push({ [groupBy]: k, result }); + } + return out; +} +export default processCSV; +// Generation time: 11.354s +// Result: PASS \ No newline at end of file diff --git a/tests/7_scheduler/outputs/openai_gpt-5.1-codex-max.js b/tests/7_scheduler/outputs/openai_gpt-5.1-codex-max.js new file mode 100644 index 0000000..c33917b --- /dev/null +++ b/tests/7_scheduler/outputs/openai_gpt-5.1-codex-max.js @@ -0,0 +1,38 @@ +async function findAvailableSlots(a,b,o){ + const {default:d}=await import('https://cdn.jsdelivr.net/npm/dayjs@1.11.10/esm/index.js') + const {default:u}=await import('https://cdn.jsdelivr.net/npm/dayjs@1.11.10/esm/plugin/utc.js') + d.extend(u) + const s=d.utc(o.searchRange.start),e=d.utc(o.searchRange.end) + const S=s.valueOf(),E=e.valueOf(),t=o.durationMinutes*6e4 + const busy=[...a,...b].map(v=>[d.utc(v.start).valueOf(),d.utc(v.end).valueOf()]).filter(v=>v[1]>S&&v[0]i[0]-j[0]) + const m=[] + for(const [b0,b1]of busy){ + const x=Math.max(b0,S),y=Math.min(b1,E) + if(!m.length||x>m[m.length-1][1])m.push([x,y]) + else m[m.length-1][1]=Math.max(m[m.length-1][1],y) + } + const r=[],ws=o.workHours.start,we=o.workHours.end + let j=0 + for(let day=s.startOf('day');day.isBefore(e);day=day.add(1,'day')){ + let w0=d.utc(`${day.format('YYYY-MM-DD')}T${ws}Z`).valueOf(),w1=d.utc(`${day.format('YYYY-MM-DD')}T${we}Z`).valueOf() + if(w1<=S||w0>=E)continue + if(w0E)w1=E + if(w0>=w1)continue + while(jp){ + for(let a=p;a+t<=Math.min(m[k][0],w1);a+=t)r.push({start:new Date(a).toISOString(),end:new Date(a+t).toISOString()}) + } + p=Math.max(p,m[k][1]) + } + if(p(e.instancePath||'root')+' '+e.message)} +} +export default validateJSON; +// Generation time: 4.189s +// Result: PASS \ No newline at end of file diff --git a/tests/9_stream_visualizer/outputs/openai_gpt-5.1-codex-max.js b/tests/9_stream_visualizer/outputs/openai_gpt-5.1-codex-max.js new file mode 100644 index 0000000..6b2ab9f --- /dev/null +++ b/tests/9_stream_visualizer/outputs/openai_gpt-5.1-codex-max.js @@ -0,0 +1,20 @@ +async function createStreamVisualizer(it,o={}){ + let{maxPoints=100,alpha=.3,width=300,height=150,yDomain:[y0,y1]=[0,1]}=o + let{scaleLinear,line}=await import('https://cdn.jsdelivr.net/npm/d3@7/+esm') + let d=[],e + for await(let{timestamp:t,value:v}of it){ + e=e==null?v:alpha*v+(1-alpha)*e + d.push({timestamp:+t,value:v,ema:e}) + d.length>maxPoints&&d.shift() + } + let p='' + if(d.length){ + let x=scaleLinear().domain([d[0].timestamp,d.at(-1).timestamp]).range([0,width]) + let y=scaleLinear().domain([y0,y1]).range([height,0]) + p=line().x(a=>x(a.timestamp)).y(a=>y(a.ema))(d)||'' + } + return{data:d,path:p} +} +export default createStreamVisualizer; +// Generation time: 25.168s +// Result: PASS \ No newline at end of file