mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 02:46:29 +00:00
2117e4b1bc592c346886b4e757dba827002df655
This PR was squashed before being merged into the 2.x branch. Discussion ---------- Hashing is not necessary to generate unique variable names during compilation Trying to optimize calls to `hash` function (#3588), I found that some calls are made during compilation that are not necessary at all. According to the last commits on this functions (57ff88255e&6ab5fe9b8f), the internal variable names must be unique and deterministic. Using a simple sequence is enough. This avoid CPU cycles during compilation. Which should not have any impact on production; but still interesting for dev&test. Commits -------ba2b4e6dHashing is not necessary to generate unique variable names during compilation
Twig, the flexible, fast, and secure template language for PHP
==============================================================
Twig is a template language for PHP.
Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.
Sponsors
--------
.. raw:: html
<a href="https://blackfire.io/docs/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
<img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
</a>
More Information
----------------
Read the `documentation`_ for more information.
.. _documentation: https://twig.symfony.com/documentation
Description
Languages
PHP
99.9%