4 ms·
>It's definitely faster than Python, Ruby, PHP and many other kids on the block... I would seriously contest the speed of Java compared to modern PHP. The JIT
by devmor 6y ago
>It's definitely faster than Python, Ruby, PHP and many other kids on the block...
I would seriously contest the speed of Java compared to modern PHP. The JIT puts PHP at near-C performance levels with competently written code. Which shouldn't be surprising if you realize PHP is largely a "wrapper" around C.
- victor106 6y agohttps://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=query https://www.techempower.com/benchmarks/#section=data-r19&hw=... Vertx framework which is based on Java is at 8th position and PHP is 18th. But the larger point is performance is only one aspect while considering which programming lang. or framework to use
- RobAley 6y agoI think you've proved your second point by getting your first wrong. The benchmarks posted are for a stack including PHP, not PHP itself (and not the fastest stack with e.g. pgsql). Also, I don't think thosd benchmarks use php 8, which is the first version with the jit that the post above referred to.
- victor106 6y agohttps://www.google.com/amp/s/onilab.com/blog/php-7-vs-php-8/amp/ https://www.google.com/amp/s/onilab.com/blog/php-7-vs-php-8/... From the page above The bottomline: PHP 8 is still slower than PHP 7. This is a realistic comparison of running Magento on php7 vs php8.
- ta988 6y agoYou may not know that Java has a JIT and a AOT if you want even a bit more perf for cold start. And they are really good.