{"id":21871777,"url":"https://github.com/ericmorand/twing-benchmark","last_synced_at":"2026-04-16T04:32:58.236Z","repository":{"id":137361434,"uuid":"126063058","full_name":"ericmorand/twing-benchmark","owner":"ericmorand","description":"twig.js versus Twing benchmark","archived":false,"fork":false,"pushed_at":"2018-09-30T12:42:33.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T17:11:19.332Z","etag":null,"topics":["benchmark","twig","twigjs","twing"],"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/ericmorand.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":"2018-03-20T18:16:44.000Z","updated_at":"2021-01-19T21:37:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"c903aeb9-c7ab-41ea-bb36-f2904d20b60f","html_url":"https://github.com/ericmorand/twing-benchmark","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Ftwing-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Ftwing-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Ftwing-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Ftwing-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericmorand","download_url":"https://codeload.github.com/ericmorand/twing-benchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244877155,"owners_count":20524966,"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","twig","twigjs","twing"],"created_at":"2024-11-28T06:15:22.776Z","updated_at":"2026-04-16T04:32:53.181Z","avatar_url":"https://github.com/ericmorand.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"twig.js versus Twing benchmark\n==============================\n\nA comparison benchmark of the latest versions of [twig.js](https://github.com/twigjs/twig.js) and [Twing](https://github.com/ericmorand/twing).\n\n## The protocol\n\nThis benchmark is based on the [Smarty versus TwigPHP benchmark](https://github.com/dominics/smarty-twig-benchmark) by dominics:\n\n* Extending one base template and overriding its blocks\n* 3 blocks, with varying default content\n* A single for loop, outputting elements of an array within one block\n\n## Usage\n\n`npm install`\n\n`npm start`\n\n## Results\n\nOn my machine, with twig.js ^1.12.0 and Twing ^2.0.0, node.js 10.9.0, 100000 iterations, compile time ignored, cache warmed:\n\nBenchmark | Time Taken\n--- | ---\ntwig.js | ~5 seconds\nTwing | ~0.6 second\n\nAs a matter of comparison, here are the results I get from Smarty versus TwigPHP benchmark on the same machine with TwigPHP 2.5.0, PHP 7.1.17, 100000 iterations, compile time ignored, cache warmed:\n\nBenchmark | Time Taken\n--- | ---\nTwigPHP | ~0.8 second","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmorand%2Ftwing-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericmorand%2Ftwing-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmorand%2Ftwing-benchmark/lists"}