‹ BackHN Continuity

Thread

I built the fastest PHP webserver in the world

44 points · 77 comments · EGreg

  1. pshirshov · · focus · HN ↗
    > 1060 req/s

    Nice! I remember 2010 when a single-core pentium 4 was happily doing 18k RPS with Glassfish. Ten more years of progress and you can match that!

    1. EGreg · · focus · HN ↗
      Glassfish was Java not PHP, and it was also using AOT (ahead-of-time) loading of bytecode, similar to what this does for PHP classes.

      The tests here were also done on one core. Although I am skeptical that PHP after so many years, on much faster CPUs, cannot outperform Java from 20 years ago on slower CPUs.

      PS: I wrote a language called U that you can transpile PHP into - and it speeds things up by another factor of 10x even over this webserver, because it’s a compiled language and it transpiles pctl_fork() into something that doesn’t require the OS forking processes (so it works even on Windows):

      <a href="https:&#x2F;&#x2F;ulanguage.org" rel="nofollow">https:&#x2F;&#x2F;ulanguage.org

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.