mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
d441ad7c672daae7ed765c6d9a77e719af4418b0
This PR was merged into the master branch. Discussion ---------- Some more optimizations Please look at commits one by one. Overall this makes the twig_escape_filter almost 20% faster here for happy path (escaping string for html with UTF-8) on 1000 calls. Still pretty darn slow, but faster. Commits -------d886b12Make happy path (strings) faster by avoiding the cast, same perfs for the other cases97bf5e5Avoid unnecessary is_object callc1c0dccUse uppercased charsets consistently (as in js/css/html_attr strategies)a23fa62Add UTF-8 in uppercase since it is so commonc891c53Avoid strtolower call at every twig_escape_filter call61f2b2aUse plain string comparison which is twice as fastd4eec01Move html case up since it is the most likely to be hit
…
Twig, the flexible, fast, and secure template language for PHP
Twig is a template language for PHP, released under the new BSD license (code and documentation).
Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment.
More Information
Read the documentation for more information.
Description
Languages
PHP
99.9%
