Docs: Update benchmark for openai/gpt-5.3-codex

This commit is contained in:
github-actions[bot]
2026-02-24 23:25:47 +00:00
parent e913b42a5d
commit dce9c2a746
12 changed files with 422 additions and 27 deletions

View File

@@ -1,4 +1,40 @@
async function findConvexHull(points = []) {
if (!Array.isArray(points)) throw new TypeError("Expected an array of points");
const { sortBy, uniqBy } = await import("https://cdn.jsdelivr.net/npm/lodash-es@4.17.21/lodash.js");
const pts = uniqBy(
sortBy(
points.filter(p => p && Number.isFinite(p.x) && Number.isFinite(p.y)),
["x", "y"]
),
p => `${p.x},${p.y}`
);
const n = pts.length;
if (n < 2) return pts.slice();
const cross = (o, a, b) => (a.x - o.x) * (b.y - o.y) - (a.y - o.y) * (b.x - o.x);
const lower = [];
for (let i = 0; i < n; i++) {
const p = pts[i];
while (lower.length > 1 && cross(lower[lower.length - 2], lower[lower.length - 1], p) <= 0) lower.pop();
lower.push(p);
}
const upper = [];
for (let i = n - 1; i >= 0; i--) {
const p = pts[i];
while (upper.length > 1 && cross(upper[upper.length - 2], upper[upper.length - 1], p) <= 0) upper.pop();
upper.push(p);
}
lower.pop();
upper.pop();
return lower.concat(upper);
}
export default findConvexHull;
// Generation time: 0.773s
// Result: FAIL
// Generation time: 16.419s
// Result: PASS