mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 08:37:56 +00:00
Docs: Update benchmark for openai/gpt-5.2 EFF:xhigh
This commit is contained in:
17
tests/4_transpiler/outputs/openai_gpt-5.2 EFF_xhigh.js
Normal file
17
tests/4_transpiler/outputs/openai_gpt-5.2 EFF_xhigh.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const HANDLEBARS_CDN = "https://cdn.jsdelivr.net/npm/handlebars@4.7.8/+esm"
|
||||
|
||||
let hbP
|
||||
const tplCache = new Map()
|
||||
|
||||
const loadHB = () => hbP ??= import(HANDLEBARS_CDN).then(m => m.default ?? m)
|
||||
|
||||
async function renderTemplate(template, data = {}) {
|
||||
if (typeof template != "string") throw new TypeError("Template must be a string")
|
||||
const HB = await loadHB()
|
||||
let fn = tplCache.get(template)
|
||||
fn || tplCache.set(template, fn = HB.compile(template))
|
||||
return fn(data ?? {})
|
||||
}
|
||||
export default renderTemplate;
|
||||
// Generation time: 77.305s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user