-
hello erveryone, I am a chinese beginner in zephir, and I want to write an example to actually test the performance of zephir. The result puzzles me. My code is as follows. php code:
zephir code:
test code:
The result is that zephir basically takes more than 3 seconds to run, while native php only takes more than 2 seconds. This is the result of multiple tests, even if it is run separately or the order is changed. Please tell me where I wrote this wrong or is zephir just a performance problem? thanks a lot ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, because string concatenation won't have any performance gain. Your code will use native PHP functions, but with +1 Zephir wrapper. In that cases you will need to implement your own functions written in C and called by zephir. See: https://docs.zephir-lang.com/0.12/en/optimizers Also see: #2151 |
Beta Was this translation helpful? Give feedback.
Hello, because string concatenation won't have any performance gain. Your code will use native PHP functions, but with +1 Zephir wrapper. In that cases you will need to implement your own functions written in C and called by zephir.
See: https://docs.zephir-lang.com/0.12/en/optimizers
Also see: #2151