mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 08:37:56 +00:00
Docs: Update benchmark for minimax/minimax-m2
This commit is contained in:
20
tests/4_transpiler/outputs/minimax_minimax-m2.js
Normal file
20
tests/4_transpiler/outputs/minimax_minimax-m2.js
Normal file
@@ -0,0 +1,20 @@
|
||||
export async function renderTemplate(template, data) {
|
||||
const load = async () => {
|
||||
try {
|
||||
const src = 'https://cdn.jsdelivr.net/npm/handlebars@4.7.7/dist/handlebars.min.js'
|
||||
const mod = await import(src)
|
||||
return mod.default || mod.Handlebars || mod
|
||||
} catch (e) {
|
||||
const alt = 'https://unpkg.com/handlebars@4.7.7/dist/handlebars.min.js'
|
||||
const mod2 = await import(alt)
|
||||
return mod2.default || mod2.Handlebars || mod2
|
||||
}
|
||||
}
|
||||
const hbs = await load()
|
||||
const s = String(template)
|
||||
const f = hbs.compile(s, { noEscape: false })
|
||||
return f(data)
|
||||
}
|
||||
export default renderTemplate;
|
||||
// Generation time: 13.350s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user