Fabien Potencier 2117e4b1bc minor #3601 Hashing is not necessary to generate unique variable names during compilation (GromNaN)
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
-------

ba2b4e6d Hashing is not necessary to generate unique variable names during compilation
2021-12-14 15:27:12 -08:00
2021-11-29 07:20:05 +02:00
2021-11-08 13:29:10 +01:00
2021-05-12 09:37:17 +02:00
2021-10-04 11:04:25 +02:00
2021-11-25 14:44:38 +01:00
2021-05-20 16:22:31 +02:00
2020-12-30 09:16:13 +01:00
2020-10-27 13:37:42 +01:00

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
Languages
PHP 99.9%