{{post.title}}
+{{post.excerpt}}
+ +diff --git a/bench-cli.mjs b/bench-cli.mjs new file mode 100644 index 00000000000..5cead062bcb --- /dev/null +++ b/bench-cli.mjs @@ -0,0 +1,276 @@ +/** + * CLI/build-style benchmark: simulates a real build pass over a project. + * + * IDE benchmark: same template, many iterations (measures JIT-warmed throughput) + * CLI benchmark: many distinct templates, one pass (cold-ish JIT, one-time init cost) + * + * Run: node bench-cli.mjs + */ + +import { join, dirname } from 'path'; +import { fileURLToPath } from 'url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +const currentDistPath = join(__dirname, 'packages/@glimmer/syntax/dist/es/index.js'); +const prDistPath = '/tmp/pr-21313/packages/@glimmer/syntax/dist/es/index.js'; + +// ─── Realistic template corpus ──────────────────────────────────────────────── +// ~50 distinct templates of varying complexity, simulating a real Ember project. + +const TEMPLATES = [ + `
{{this.description}}
`, + `{{#let (hash name=@name age=@age) as |person|}}{{person.name}}{{/let}}`, + ``, + + `| + {{col.label}} + {{#if (eq this.sortKey col.key)}} + + {{/if}} + | + {{/each}} +
|---|
| {{get row col.key}} | + {{/each}} +
{{@subtitle}}
{{/if}} +{{item.description}}
+ {{/if}} + +{{data.description}}
+ {{#each data.tags as |tag|}} + {{tag}} + {{/each}} + +{{t "upload.dropzone"}}
+ {{/if}} +