mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 03:11:01 +00:00
Docs: Update benchmark for openrouter/aurora-alpha
This commit is contained in:
18
tests/3_lis/outputs/openrouter_aurora-alpha.js
Normal file
18
tests/3_lis/outputs/openrouter_aurora-alpha.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const findLISLength = async arr => {
|
||||
if (!Array.isArray(arr)) throw new TypeError('Input must be an array');
|
||||
|
||||
const { bisectLeft } = await import(
|
||||
'https://cdn.jsdelivr.net/npm/d3-array@3.2.4/+esm'
|
||||
);
|
||||
|
||||
const tails = [];
|
||||
for (const v of arr) {
|
||||
const i = bisectLeft(tails, v);
|
||||
if (i === tails.length) tails.push(v);
|
||||
else tails[i] = v;
|
||||
}
|
||||
return tails.length;
|
||||
};
|
||||
export default findLISLength;
|
||||
// Generation time: 0.883s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user