{"id":15091625,"url":"https://github.com/itsarnaud/template-engine-bench","last_synced_at":"2025-04-12T06:31:20.460Z","repository":{"id":233499992,"uuid":"786948663","full_name":"itsarnaud/template-engine-bench","owner":"itsarnaud","description":"This project is a benchmark designed to evaluate the performance of various JavaScript template engines. It allows developers to compare rendering performance of several popular template engines in various scenarios","archived":false,"fork":false,"pushed_at":"2025-01-05T11:11:50.000Z","size":215,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T01:51:12.930Z","etag":null,"topics":["benchmark","ejs","eta","handlebars","igodust","js","liquid","pug","template-engine"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsarnaud.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-15T15:52:06.000Z","updated_at":"2025-01-29T16:44:45.000Z","dependencies_parsed_at":"2024-04-23T10:23:42.594Z","dependency_job_id":"ee6d1ab4-9a9b-4f0e-809a-e02d03540adb","html_url":"https://github.com/itsarnaud/template-engine-bench","commit_stats":null,"previous_names":["itsarnaud/template-bench","itsarnaud/template-engine-bench","itsarnaud/templating-engine-bench"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsarnaud%2Ftemplate-engine-bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsarnaud%2Ftemplate-engine-bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsarnaud%2Ftemplate-engine-bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsarnaud%2Ftemplate-engine-bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsarnaud","download_url":"https://codeload.github.com/itsarnaud/template-engine-bench/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529481,"owners_count":21119519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","ejs","eta","handlebars","igodust","js","liquid","pug","template-engine"],"created_at":"2024-09-25T10:42:10.829Z","updated_at":"2025-04-12T06:31:15.427Z","avatar_url":"https://github.com/itsarnaud.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template Engine Benchmark\n\nThis project is a benchmark designed to evaluate the performance of various JavaScript template engines. It allows developers to compare rendering performance of several popular template engines in various scenarios.\n\n## How to use ?\n\n**1. Clone this repo on your machine:**\n```bash\ngit clone https://github.com/itsarnaud/templating-engine-bench.git\n```\n\n**2. Install dependencies:**\n```bash\nnpm install\n```\n\n**3. Launch the benchmark by executing:**\n```bash\nnode main.js\n```\n\n**4. Results:\u003cbr/\u003e**\nOnce the benchmark is completed, the results will be automatically updated in the readme file.\n\n## Current results\n\nThe tests were carried out on:\n- Node v21.7.2\n- MacBook Air M2, 15-inch with 16GB of RAM (2023)\n\n\u003c!-- \u003crender performance\u003e --\u003e\n## RENDER \n\n### friends (runned 5000 times) \n`pug` =\u003e **504ms** \u003cbr/\u003e \n`igodust` =\u003e **603ms** \u003cbr/\u003e \n`eta` =\u003e **610ms** \u003cbr/\u003e \n`handlebars` =\u003e **1181ms** \u003cbr/\u003e \n`ejs` =\u003e **3618ms** \u003cbr/\u003e \n`liquidjs` =\u003e **14825ms** \u003cbr/\u003e \n\n### if-expression (runned 5000 times) \n`pug` =\u003e **6ms** \u003cbr/\u003e \n`igodust` =\u003e **7ms** \u003cbr/\u003e \n`liquidjs` =\u003e **82ms** \u003cbr/\u003e \n`eta` =\u003e **88ms** \u003cbr/\u003e \n`ejs` =\u003e **130ms** \u003cbr/\u003e \n\n### projects-escaped (runned 5000 times) \n`handlebars` =\u003e **38ms** \u003cbr/\u003e \n`igodust` =\u003e **42ms** \u003cbr/\u003e \n`eta` =\u003e **109ms** \u003cbr/\u003e \n`liquidjs` =\u003e **145ms** \u003cbr/\u003e \n`pug` =\u003e **157ms** \u003cbr/\u003e \n`ejs` =\u003e **185ms** \u003cbr/\u003e \n\n### projects-unescaped (runned 5000 times) \n`igodust` =\u003e **8ms** \u003cbr/\u003e \n`handlebars` =\u003e **36ms** \u003cbr/\u003e \n`eta` =\u003e **106ms** \u003cbr/\u003e \n`liquidjs` =\u003e **141ms** \u003cbr/\u003e \n`pug` =\u003e **156ms** \u003cbr/\u003e \n`ejs` =\u003e **179ms** \u003cbr/\u003e \n\n### search-results (runned 5000 times) \n`igodust` =\u003e **16ms** \u003cbr/\u003e \n`pug` =\u003e **57ms** \u003cbr/\u003e \n`handlebars` =\u003e **146ms** \u003cbr/\u003e \n`eta` =\u003e **164ms** \u003cbr/\u003e \n`ejs` =\u003e **585ms** \u003cbr/\u003e \n`liquidjs` =\u003e **1328ms** \u003cbr/\u003e \n\n### simple-0 (runned 5000 times) \n`pug` =\u003e **1ms** \u003cbr/\u003e \n`igodust` =\u003e **5ms** \u003cbr/\u003e \n`liquidjs` =\u003e **7ms** \u003cbr/\u003e \n`handlebars` =\u003e **11ms** \u003cbr/\u003e \n`ejs` =\u003e **59ms** \u003cbr/\u003e \n`eta` =\u003e **64ms** \u003cbr/\u003e \n\n### simple-1 (runned 5000 times) \n`pug` =\u003e **7ms** \u003cbr/\u003e \n`igodust` =\u003e **10ms** \u003cbr/\u003e \n`handlebars` =\u003e **19ms** \u003cbr/\u003e \n`eta` =\u003e **88ms** \u003cbr/\u003e \n`liquidjs` =\u003e **94ms** \u003cbr/\u003e \n`ejs` =\u003e **166ms** \u003cbr/\u003e \n\n### simple-2 (runned 5000 times) \n`pug` =\u003e **6ms** \u003cbr/\u003e \n`igodust` =\u003e **9ms** \u003cbr/\u003e \n`handlebars` =\u003e **14ms** \u003cbr/\u003e \n`eta` =\u003e **89ms** \u003cbr/\u003e \n`liquidjs` =\u003e **91ms** \u003cbr/\u003e \n`ejs` =\u003e **149ms** \u003cbr/\u003e \n\n\u003c!-- \u003cend\u003e --\u003e\n\n## Adding a new Template Engine\n\nTo add a new template engine to this project, follow these simple steps:\n\n**1. Create a file for the template engine:\u003cbr/\u003e**\nIn the `engines` directory, create a new file named after your template engine, for example `my-engine.js`. Take a look at the files already created for the syntax.\n\n```\nengines\n ├── igodust.js\n ├── my-engine.js\n └── ...\n```\n**⚠️ WARNING: Asynchronous rendering methods, such as those returning Promises, are not supported by the benchmarking tool at the moment. Ensure that your rendering method is synchronous to work with the benchmarking tool effectively. ⚠️**\n\n**2. Add test templates: \u003cbr/\u003e**\nPlace your template files in the templates directory, following the existing structure. Each test group should have a data file (.js or .json) and template files for each template engine you want to include in the benchmark.\n\n```\ntemplates\n ├── group1\n │   ├── data.js (or json)\n │   ├── template.dust\n │   ├── template.my-engine\n │   └── ...\n └── ...\n```\n\n And that's it, all you have to do is launch the benchmark!\n\n PRs are welcome 😃❤️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsarnaud%2Ftemplate-engine-bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsarnaud%2Ftemplate-engine-bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsarnaud%2Ftemplate-engine-bench/lists"}