Go IS Slower Than PHP | Prime Reacts

preview_player
Показать описание
Recorded live on twitch, GET IN

MY MAIN YT CHANNEL: Has well edited engineering videos

Discord

Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
Рекомендации по теме
Комментарии
Автор

Mojo claim to be 35, 000 times faster than Python -​> C is 80 times faster than Python -​> Mojo 437.5 times faster than C -​> Mojo faster than machine code

keenoogodlike
Автор

Even if the benchmark might not be accurate when comparing to other languages, you have to admit that making a PHP script go from 630 requests/sec to nearly 30k requests/sec is a massive improvement.

multiwebinc
Автор

There are lies, damned lies, and statistics.

zrocodes
Автор

The baseline PHP test was done with the internal server which is meant for quick and dirty testing/dev, not production. PHP-FPM is far faster than that, especially if configured properly for production

dimitris
Автор

I'm pretty sure databases are the main bottlenecks and the source of troubles for 99% of backend applications.
Juniors who have no experience of tackling serious performance issues in backend systems, tend to like this kind of discussions.

ANONAAAAAAAAA
Автор

I've been using PHP since 2002. I've seen the good, the bad and the ugly. In recent years I started seeing PHP going from ugly, to bad, to good, to great.

Hobbitstomper
Автор

I've been making my own framework with OpenSwoole for a while. I can confirm, it is faster than Bun and while I haven't tested Go, it can't be that much slower. Although you have to take into consideration that Go is compiled, and this speed is only in a vacuum. Once you start building out ALL the rest of the application Go will, of course, be faster. On top of that, the OpenSwoole library is not actually PHP. It's an extension, written in C++.

David-ngqh
Автор

Funny how the base compare is with a PHP development server (which should never be used in prod), would like to see how PHP-FPM or the apache module performs, not a dev server.

JulioHD
Автор

PHPs integrated server (the first benchmark) is a development server. It doesn't even use multiple workers by default. It's not meant to be used in production. Of course, the second benchmark is also inaccurate because it benchmarks OpenSwole and PHPs JSON implementation which are both written in C, not PHP.

ilu
Автор

Love the consistent quality content Prime Time. :) Thx

patrickhollywood
Автор

10 lines of code benchmarks are like looking through a keyhole and trying to figure out the room's size.

geoblk
Автор

Enough GO. It's time for PHP, again.

xhnypot
Автор

Virgin rustard developer vs chad swoole PHP expert

Andressuquaz
Автор

Are you sure that's the fastest Bun? Have you tried Elysiajs? I don't know i expected Bun more closed to Go.

oscarljimenez
Автор

At some point someone will write code so fast it’ll break the laws of physics and we’ll collapse into a black hole…

Kane
Автор

Blazingly fast! Laravel Octane just wraps the PHP Laravel up inside of a go routine and keeps it all in memory. Pretty cool advancement, PHP lives to fight another day.

MickDavies
Автор

I’ve tried Swoole but I’m not sure if it’s production ready per se, but it’s an exciting direction for PHP. Definitely requires you to think differently and carefully about how you architect your PHP app since it is contrary to the traditional model of the short lived lifecycle (where everything starts fresh and gets discarded at end of request). It is very interesting, though.

patricknelson
Автор

the php guy's voice reminds me of a mix of "DailyDoseOfInternet" and "Fireship"

akarin-desu
Автор

I love OpenSwoole - finally PSR-7 compliant as well now. PHP and Go are similar in that they compile extra fast. PHP, Java, and .Net are similar in that there is a virtual machine running translated bytecode.

electricshmoo
Автор

did i just.. witness a birth of a supervillain?

ondrejmarek