As a result, the execution speed can be extremely increased because no code need to be parsed when a parsing result is already available in the cache. In such a case, only the abstract syntax tree has to be traversed, which is extremely fast, since the corresponding code is compact and strongly optimized.
It would also be very easy to translate the abstract syntax tree into PHP code instead. Maybe we will integrate such a feature in the future. However, this is not really necessary since the template engine can also cache the content with a
cache tag. If you use the cache wisely, you can generate websites extremely fast because there is very little code left to execute. Therefore, compiled PHP code would not bring much additional acceleration.
Even without a cache adapter and even on very weak hardware, the speed is still very good, because the template engine always caches compiled expressions also statically in a simple array. In addition, the template engine uses a regular expression to parse the code, and this is done at the speed of PCRE code which is written in C.
Caching is recommended only in production mode, but not in development mode.