News for hackers. Stuff that matters.
Re:How F5Bot Slurps All of Reddit by wolco on Monday July 30, 2018 @04:49PM (#17647887)
"You may think PHP is slow"

Why would we think php is slow? PHP is blazing fast certain applications (looking at you sugarcrm) make this into a mockery by rewriting queries and loading unnecessary data into each page request.

Nice to see a php related show and tell.

Re:How F5Bot Slurps All of Reddit by bufferoverflow on Monday July 30, 2018 @04:56PM (#17647948)
PHP used to be very slow, it got better with v7.0.

It's still quite slow compared to C/C++/Rust/Go, more than 10x slower:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re:How F5Bot Slurps All of Reddit by sieabahlpark on Monday July 30, 2018 @05:12PM (#17648086)
An interpreted language is slower than a compiled binary? Color me shocked.
Re:How F5Bot Slurps All of Reddit by hk__2 on Monday July 30, 2018 @05:46PM (#17648383)
> An interpreted language is slower than a compiled binary? Color me shocked.

That same benchmark shows JS code that’s 6x faster than PHP.

Re:How F5Bot Slurps All of Reddit by barrkel on Monday July 30, 2018 @06:06PM (#17648570)
Yes, but JS is faster than Ruby and Python, and indeed most of your go-to scripting options.
Re:How F5Bot Slurps All of Reddit by anonytrary on Tuesday July 31, 2018 @02:24AM (#17650974)
JS has the advantage of being the thing that makes your website run faster on the screen of the user whose clicks are earning you ad dollars. JS is in a good spot.
Re:How F5Bot Slurps All of Reddit by NVRM on Wednesday August 01, 2018 @08:12AM (#17661739)
Re:How F5Bot Slurps All of Reddit by igouy on Wednesday August 01, 2018 @04:27PM (#17666654)
Re:How F5Bot Slurps All of Reddit by bufferoverflow on Monday July 30, 2018 @06:30PM (#17648749)
PHP is JIT-compiled, which helps.
Re:How F5Bot Slurps All of Reddit by igouy on Tuesday July 31, 2018 @12:50PM (#17654745)
Just curious - why did you choose fasta as your comparison?
Re:How F5Bot Slurps All of Reddit by jonknee on Monday July 30, 2018 @05:13PM (#17648095)
Because for a long time (critically, when PHP was very popular) it was quite slow. It has gotten better, but a lot of people haven't used it since it was slow.
Re:How F5Bot Slurps All of Reddit by jack9 on Monday July 30, 2018 @11:47PM (#17650402)
Quite slow compared to what?

PHP was popular when it had MySQL bindings that were always up to date with MySQL changes and apache PHP setup was simplistic. Thus the LAMP stack, right? It has always been rather fast, in the larger ecosystem of web scripting languages (especially if you avoided particular BIFs) but it got a LOT faster in 7 as the slowest bits were optimized alongside everything else.