{"id":13446868,"url":"https://github.com/marko-js/templating-benchmarks","last_synced_at":"2025-11-27T20:06:23.679Z","repository":{"id":15681660,"uuid":"18419237","full_name":"marko-js/templating-benchmarks","owner":"marko-js","description":"Benchmarking framework for multiple templating engines","archived":false,"fork":false,"pushed_at":"2019-03-06T01:42:38.000Z","size":505,"stargazers_count":138,"open_issues_count":11,"forks_count":24,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-23T13:01:54.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marko-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-03T21:43:43.000Z","updated_at":"2024-08-12T02:37:47.000Z","dependencies_parsed_at":"2022-09-10T08:41:22.131Z","dependency_job_id":null,"html_url":"https://github.com/marko-js/templating-benchmarks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marko-js/templating-benchmarks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marko-js%2Ftemplating-benchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marko-js%2Ftemplating-benchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marko-js%2Ftemplating-benchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marko-js%2Ftemplating-benchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marko-js","download_url":"https://codeload.github.com/marko-js/templating-benchmarks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marko-js%2Ftemplating-benchmarks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27282348,"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","status":"online","status_checked_at":"2025-11-26T02:00:06.075Z","response_time":193,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-07-31T05:01:01.923Z","updated_at":"2025-11-27T20:06:23.663Z","avatar_url":"https://github.com/marko-js.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"templating-benchmarks\n=====================\n\nThis project provides a framework for running benchmarks against multiple templating engines under Node.js. The following templating engine modules are currently integrated:\n\nTemplate | Syntax | Streaming | Asynchronous | Auto-escape\n---- | ---- | ---- | ---- | ----\n[dustjs-linkedin](https://github.com/linkedin/dustjs) | Text | ✔ | ✔ | ✔\n[doT](https://github.com/olado/doT) | Text | ✖ | ✖ | ✖\n[handlebars](https://github.com/wycats/handlebars.js) | Text | ✖ | ✖ | ✔\n[pug](https://github.com/pugjs/pug) | Short-hand HTML | ✖ | ✖ | ✔\n[marko](https://github.com/marko-js/marko) | HTML/Concise HTML | ✔ | ✔ | ✔\n[nunjucks](http://mozilla.github.io/nunjucks/) | Text | ✖ | ✔ | ✖\n[react](https://facebook.github.io/react/)\u003csup\u003e1\u003c/sup\u003e | JSX | ✖ | ✖ | ✔\n[swig](http://mozilla.github.io/nunjucks/) | Text | ✖ | ✖ | ✔\n\nNOTE 1: While React is not a \"templating engine\", it is commonly used to render HTML on the server so it has been included in this benchmark.\n\n# Table of Contents\n\n- [Run Benchmarks](#run-benchmarks)\n- [Current Results](#current-results)\n\t- [Performance](#performance)\n\t- [Compiled Size](#compiled-size)\n- [Client-side Runtime Sizes](#client-side-runtime-sizes)\n\t- [Marko](#marko)\n\t- [Dust](#dust)\n- [Contribute](#contribute)\n\t- [Adding a New Comparison Group](#adding-a-new-comparison-group)\n\t- [Adding a New Template Engine](#adding-a-new-template-engine)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# Run Benchmarks\n\n1. Clone this repository\n2. `npm install`\n3. `npm test` (or `make`)\n\n# Current Results\n\nThe following results were collected with the following setup:\n\n- Node.js v7.4.0\n- MacBook Pro (Retina, 15-inch, Mid 2014)\n- Processor: 2.8 GHz Intel Core i7\n- Memory: 16 GB 1600 MHz DDR3\n\n## Performance\n\nHigher numbers are better.\n\n\u003c!-- \u003cperformance\u003e --\u003e\n```\n                      RUNTIME PERFORMANCE\n                      ===================\n                      friends\n                   ✓ marko »    4,780 op/s (fastest)\n                    ✗ dust »      868 op/s (81.84% slower)\n\n                      if-expression\n                   ✓ marko »  603,718 op/s (fastest)\n                     ✗ pug »  495,798 op/s (17.88% slower)\n                    ✗ jade »   73,946 op/s (87.75% slower)\n\n                      projects-escaped\n                   ✓ marko »  116,897 op/s (fastest)\n      ✗ marko (native-for) »  114,487 op/s (2.06% slower)\n              ✗ handlebars »   64,465 op/s (44.85% slower)\n                    ✗ dust »   41,080 op/s (64.86% slower)\n\n                      projects-unescaped\n      ✓ marko (native-for) »  476,404 op/s (fastest)\n                   ✗ marko »  416,648 op/s (12.54% slower)\n              ✗ handlebars »  182,510 op/s (61.69% slower)\n                    ✗ dust »  123,418 op/s (74.09% slower)\n\n                      reverse-helper\n                   ✓ marko »  571,518 op/s (fastest)\n                    ✗ dust »  361,126 op/s (36.81% slower)\n\n                      search-results\n                   ✓ marko »   47,645 op/s (fastest)\n                    ✗ dust »   15,447 op/s (67.58% slower)\n\n                      simple-0\n                   ✓ marko »  472,020 op/s (fastest)\n                     ✗ es6 »  466,638 op/s (1.14% slower)\n                  ✗ lodash »  291,743 op/s (38.19% slower)\n                    ✗ dust »  250,187 op/s (47.00% slower)\n\n                      simple-1\n                     ✓ pug »  415,779 op/s (fastest)\n                   ✗ marko »  363,983 op/s (12.46% slower)\n                     ✗ dot »  299,093 op/s (28.06% slower)\n              ✗ handlebars »  161,886 op/s (61.06% slower)\n                    ✗ dust »  135,315 op/s (67.46% slower)\n                    ✗ jade »   88,483 op/s (78.72% slower)\n                ✗ nunjucks »   56,782 op/s (86.34% slower)\n                    ✗ swig »   54,721 op/s (86.84% slower)\n                     ✗ vue »   15,601 op/s (96.25% slower)\n                   ✗ react »    3,874 op/s (99.07% slower)\n\n                      simple-2\n                   ✓ marko »  437,265 op/s (fastest)\n                    ✗ dust »  154,719 op/s (64.62% slower)\n\n                      ui-components\n                   ✓ marko »  199,304 op/s (fastest)\n                   ✗ react »    3,621 op/s (98.18% slower)\n```\n\u003c!-- \u003c/performance\u003e --\u003e\n\n## Compiled Size\n\nLower numbers are better.\n\n\u003c!-- \u003csize\u003e --\u003e\n```\n                      COMPILED SIZE (gzipped/uncompressed)\n                      ====================================\n                      friends\n                    ✓ dust »   489 bytes gzipped    1378 bytes uncompressed\n                                      (smallest)                 (smallest)\n                   ✗ marko »   667 bytes gzipped    1887 bytes uncompressed\n                                   26.69% larger              26.97% larger\n\n                      if-expression\n                   ✓ marko »   344 bytes gzipped     680 bytes uncompressed\n                                      (smallest)                 (smallest)\n                    ✗ jade »   388 bytes gzipped    1049 bytes uncompressed\n                                   11.34% larger              35.18% larger\n                     ✗ pug »   905 bytes gzipped    2138 bytes uncompressed\n                                   61.99% larger              68.19% larger\n\n                      projects-escaped\n                    ✓ dust »   262 bytes gzipped     554 bytes uncompressed\n                                      (smallest)                 (smallest)\n                   ✗ marko »   432 bytes gzipped    1182 bytes uncompressed\n                                   39.35% larger              53.13% larger\n      ✗ marko (native-for) »   445 bytes gzipped    1182 bytes uncompressed\n                                   41.12% larger              53.13% larger\n              ✗ handlebars »   558 bytes gzipped    1594 bytes uncompressed\n                                   53.05% larger              65.24% larger\n\n                      projects-unescaped\n                    ✓ dust »   268 bytes gzipped     586 bytes uncompressed\n                                      (smallest)                 (smallest)\n                   ✗ marko »   419 bytes gzipped    1125 bytes uncompressed\n                                   36.04% larger              47.91% larger\n      ✗ marko (native-for) »   433 bytes gzipped    1125 bytes uncompressed\n                                   38.11% larger              47.91% larger\n              ✗ handlebars »   535 bytes gzipped    1626 bytes uncompressed\n                                   49.91% larger              63.96% larger\n\n                      reverse-helper\n                    ✓ dust »   147 bytes gzipped     312 bytes uncompressed\n                                      (smallest)                 (smallest)\n                   ✗ marko »   246 bytes gzipped     524 bytes uncompressed\n                                   40.24% larger              40.46% larger\n\n                      search-results\n                    ✓ dust »   544 bytes gzipped    1514 bytes uncompressed\n                                      (smallest)               0.59% larger\n                   ✗ marko »   597 bytes gzipped    1505 bytes uncompressed\n                                    8.88% larger                 (smallest)\n\n                      simple-0\n                    ✓ dust »   173 bytes gzipped     234 bytes uncompressed\n                                      (smallest)                 (smallest)\n                   ✗ marko »   213 bytes gzipped     345 bytes uncompressed\n                                   18.78% larger              32.17% larger\n\n                      simple-1\n                   ✓ react »   395 bytes gzipped     850 bytes uncompressed\n                                      (smallest)               5.53% larger\n                    ✗ dust »   413 bytes gzipped     884 bytes uncompressed\n                                    4.36% larger               9.16% larger\n                   ✗ marko »   485 bytes gzipped     956 bytes uncompressed\n                                   18.56% larger              16.00% larger\n                     ✗ dot »   491 bytes gzipped     803 bytes uncompressed\n                                   19.55% larger                 (smallest)\n                    ✗ jade »   524 bytes gzipped    1116 bytes uncompressed\n                                   24.62% larger              28.05% larger\n                ✗ nunjucks »   599 bytes gzipped    1367 bytes uncompressed\n                                   34.06% larger              41.26% larger\n              ✗ handlebars »   617 bytes gzipped    1492 bytes uncompressed\n                                   35.98% larger              46.18% larger\n                    ✗ swig »   756 bytes gzipped    3378 bytes uncompressed\n                                   47.75% larger              76.23% larger\n                     ✗ pug »  1047 bytes gzipped    2304 bytes uncompressed\n                                   62.27% larger              65.15% larger\n\n                      simple-2\n                    ✓ dust »   267 bytes gzipped     639 bytes uncompressed\n                                      (smallest)                 (smallest)\n                   ✗ marko »   311 bytes gzipped     739 bytes uncompressed\n                                   14.15% larger              13.53% larger\n\n                      ui-components\n                   ✓ react »   204 bytes gzipped     310 bytes uncompressed\n                                      (smallest)                 (smallest)\n                   ✗ marko »   274 bytes gzipped     559 bytes uncompressed\n                                   25.55% larger              44.54% larger\n```\n\u003c!-- \u003c/size\u003e --\u003e\n\n# Client-side Runtime Sizes\n\nBelow are the approximate runtime sizes for each engine (lower numbers are better):\n\n## Marko\n\n| Modules        | Size |\n| ------------- |:-------------:| -----:|\n| `marko` | ~1.2KB gzipped (2.7KB uncompressed) |\n| `marko` +\u003cbr\u003e`async-writer` + \u003cbr\u003e`raptor-xml/util` | ~2.33KB gzipped (6.3KB uncompressed) |\n\n_NOTE:_ Sizes are approximate because overhead associated with the CommonJS module loader varies. Size based on code as of April 7, 2014.\n\n## Dust\n\n| Modules        | Size |\n| ------------- |:-------------:| -----:|\n| `dust-core` | 3.41KB gzipped (10.07KB uncompressed) |\n| `dust-core` +\u003cbr\u003e`dust-helpers` | 4.7KB gzipped (14.2KB uncompressed) |\n\n_NOTE:_ Size based on code as of April 7, 2014.\n\n# Contribute\n\n## Adding a New Comparison Group\n\nEach comparison group should contain a data file (either `data.json` or `data.js`) and a set of templates to compare. The file extension of the template will be used to determine which engine should be used. If the data file has the `.js` extension then it should be a JavaScript module that exports the data. A sample directory structure is shown below:\n\n```\ntemplates\n    ├── group1\n    │   ├── data.js\n    │   ├── template.dust\n    │   └── template.marko\n    ├── group2\n    │   ├── data.json\n    │   ├── template.dust\n    │   └── template.marko\n    ├── group3\n    │   ├── data.json\n    │   ├── template.dust\n    │   ├── template.native-for.marko\n    │   └── template.marko\n    └── group4\n        ├── data.json\n        ├── template.dust\n        └── template.marko\n```\n\n## Adding a New Template Engine\n\nTo register a new templating engine, simply create a new module under the `engines` directory and it will automatically be loaded. See existing engine modules for supported methods and properties.\n\nPull Requests welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarko-js%2Ftemplating-benchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarko-js%2Ftemplating-benchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarko-js%2Ftemplating-benchmarks/lists"}