Docs: Update benchmark for google/gemini-3-flash-preview

This commit is contained in:
github-actions[bot]
2025-12-17 16:44:44 +00:00
parent 36b2e04fc3
commit 0bea7a0d26
11 changed files with 263 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
export const findConvexHull = async (points) => {
const _ = (await import('https://cdn.jsdelivr.net/npm/lodash-es@4.17.21/+esm')).default;
const sorted = _.sortBy(_.uniqWith(points, _.isEqual), ['x', 'y']);
if (sorted.length < 3) return sorted;
const crossProduct = (a, b, c) => (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
const buildChain = (arr) => {
const chain = [];
for (const p of arr) {
while (chain.length >= 2 && crossProduct(chain[chain.length - 2], chain[chain.length - 1], p) <= 0) {
chain.pop();
}
chain.push(p);
}
return chain;
};
const lower = buildChain(sorted);
const upper = buildChain([...sorted].reverse());
return [...lower.slice(0, -1), ...upper.slice(0, -1)];
};
export default findConvexHull;
// Generation time: 12.985s
// Result: PASS