Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>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.



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


I 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.


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.


You 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: