Closed avriltank closed 2 years ago
There is not enough information; please specify what's the command line arguments, and ensure you're not debugging the script from Visual Studio.
Also, please note, PHP nor PeachPie do not run as a script (whatever it means).
just checked; PeachPie 1.0 produces the following equivalent to the compiled C# program:
public static void main(Context? <ctx>) {
PhpNumber sum = PhpNumber.Default;
PhpValue start = Miscellaneous.microtime(returnDouble: true);
sum = 0L;
for (long i = 0L; i < 10000000000L; i++) {
sum += i;
}
PhpValue end = Miscellaneous.microtime(returnDouble: true);
Operators.Echo(PhpNumber.Sub(end, start), <ctx>);
}
which is the best we can do; please share your project and steps to reproduce the benchmark.
First,thanks for your reply!This is great project!As a general rule, the compiled code's speed should not be so slow!But the result takes 142s!The same php code run in php8-jit only takes 25s
php81-jit:28s peachpie-exe:142s
I think pechpie also run as a script!