Docs: Update benchmark results

This commit is contained in:
github-actions[bot]
2025-11-27 19:36:55 +00:00
parent e8b9dd6d0e
commit ba567f4017
109 changed files with 1138 additions and 1679 deletions

View File

@@ -2,4 +2,6 @@ async function renderTemplate(template, data) {
const { default: Handlebars } = await import('https://esm.sh/handlebars');
return Handlebars.compile(template)(data);
}
export default renderTemplate;
export default renderTemplate;
// Generation time: 2.930s
// Result: PASS

View File

@@ -1,9 +1,7 @@
async function renderTemplate(templateString, data) {
const { default: Handlebars } = await import(
'https://cdn.jsdelivr.net/npm/handlebars@4.7.8/dist/handlebars.min.js'
);
const template = Handlebars.compile(templateString);
return template(data);
async function renderTemplate(template, data) {
const { default: Handlebars } = await import('https://cdn.jsdelivr.net/npm/handlebars@4.7.8/dist/handlebars.min.js');
return Handlebars.compile(template)(data);
}
export default renderTemplate;
export default renderTemplate;
// Generation time: 2.224s
// Result: FAIL

View File

@@ -1,5 +0,0 @@
const renderTemplate = async (templateString, data) => {
const { default: Handlebars } = await import('https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.min.js');
return Handlebars.compile(templateString)(data);
};
export default renderTemplate;

View File

@@ -1,5 +1,6 @@
const renderTemplate = async (tmpl, data) => {
const { default: H } = await import('https://cdn.jsdelivr.net/npm/handlebars@latest/+esm')
return H.compile(tmpl)(data)
}
export default renderTemplate;
const renderTemplate = async (t, d) =>
(await import('https://esm.sh/handlebars'))
.default.compile(t)(d)
export default renderTemplate;
// Generation time: 29.656s
// Result: PASS

View File

@@ -1,7 +1,12 @@
let h, c = new Map();
const renderTemplate = async (t, d) => {
h ||= (await import('https://cdn.jsdelivr.net/npm/handlebars@4.7.8/dist/handlebars.min.js')).default;
c.has(t) || c.set(t, h.compile(t));
return c.get(t)(d);
let hb;
export const renderTemplate=async(t,d)=>{
try{
hb??=(await import('https://cdn.jsdelivr.net/npm/handlebars@4.7.8/dist/handlebars.mjs')).default;
return hb.compile(t)(d);
}catch(e){
throw new Error(`Render failed: ${e.message}`);
}
};
export default renderTemplate;
export default renderTemplate;
// Generation time: 50.722s
// Result: FAIL

View File

@@ -1,5 +1,7 @@
async function renderTemplate(t,d){
const {default:h}=await import('https://cdn.jsdelivr.net/npm/handlebars@latest/+esm')
return h.compile(t)(d)
async function renderTemplate(tpl, data) {
const { default: h } = await import('https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.esm.js')
return h.compile(tpl)(data)
}
export default renderTemplate;
export default renderTemplate;
// Generation time: 2.868s
// Result: FAIL

View File

@@ -1,6 +0,0 @@
const renderTemplate = async (template, data) => {
const { default: Handlebars } = await import('https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.min.js')
const compiled = Handlebars.compile(template)
return compiled(data)
}
export default renderTemplate;

View File

@@ -1,8 +0,0 @@
const getHandlebars=(async()=>(await import('https://esm.sh/handlebars@4.7.8')).default)();
async function renderTemplate(template,data){
const Handlebars=await getHandlebars;
const fn=Handlebars.compile(template);
return fn(data);
}
export default renderTemplate;

View File

@@ -0,0 +1,8 @@
async function renderTemplate(template, data) {
const { default: Handlebars } = await import('https://esm.sh/handlebars');
const compiled = Handlebars.compile(template);
return compiled(data);
}
export default renderTemplate;
// Generation time: 22.419s
// Result: PASS