PHP web framework comparison: any two, head to head
swoole is ahead of hyperf on 14 of the 15 tests they both run, and behind on 1. On the HTTP/1.1 composite swoole scores 4557 and hyperf 1632.
Pick any two of the 5 PHP entries. Requests per second is the best of three runs and the delta is the first column against the second; every row is the same profile at the same connection count, on the same machine. The fixed-rate profiles offer every entry the same request rate, so they are compared on their score out of 100 instead, which is CPU cost and latency at that rate. What each profile measures.
| Profile | Conns | swoole | hyperf | Delta | swoole p99 | hyperf p99 |
|---|---|---|---|---|---|---|
| Requests per second | ||||||
| Baseline | 4,096 | 2,310,475 | 387,711 | +496% | 9.83ms | 12.90ms |
| Pipelined | 4,096 | 3,298,449 | 466,686 | +607% | 44.50ms | 300.30ms |
| Short-lived | 4,096 | 1,940,869 | 294,276 | +560% | 10.00ms | 17.80ms |
| Async Delay | 32,000 | 12,618 | 303,908 | -96% | 5.00s | 121.20ms |
| JSON Comp | 4,096 | 544,249 | 242,307 | +125% | 35.00ms | 22.80ms |
| JSON Comp | 16,384 | 539,064 | 241,986 | +123% | 100.20ms | 47.10ms |
| JSON TLS | 4,096 | 797,654 | 199,611 | +300% | 111.38ms | 422.16ms |
| Async DB | 1,024 | 249,837 | 63,281 | +295% | 25.70ms | 34.90ms |
| Echo | 512 | 3,056,601 | 431,538 | +608% | 3.04ms | 1.64ms |
| Echo | 4,096 | 3,354,954 | 429,659 | +681% | 6.79ms | 10.50ms |
| Echo | 16,384 | 3,168,894 | 414,613 | +664% | 13.70ms | 13.90ms |
| Fixed-rate profiles: score out of 100 | ||||||
| Latency-10K | 1,024 | 73.8 | 39.8 | +85% | 117us | 366us |
| Latency-1M | 1,024 | 69.5 | 2.8 | +2382% | 210us | 13.67s |
| Latency-500K/8 | 1,024 | 21.2 | 1.3 | +1531% | 10.42s | 16.52s |
| 8Gbit | 512 | 75.2 | 35.7 | +111% | 142us | 1.16ms |
Common comparisons
swoole vs hyperf · swoole vs php-fpm · swoole vs true-async-server · hyperf vs php-fpm · hyperf vs true-async-server · php-fpm vs true-async-server
Questions
Is swoole faster than hyperf?
swoole is ahead of hyperf on 14 of the 15 tests they both run, and behind on 1. On the HTTP/1.1 composite swoole scores 4557 and hyperf 1632. Both run on the same machine, in the same round, against the same profiles.
Is swoole faster than php-fpm?
swoole is ahead of php-fpm on 13 of the 16 tests they both run, and behind on 3. On the HTTP/1.1 composite swoole scores 4557 and php-fpm 1259. Both run on the same machine, in the same round, against the same profiles.
Is swoole faster than true-async-server?
swoole is ahead of true-async-server on 10 of the 16 tests they both run, and behind on 6. On the HTTP/1.1 composite swoole scores 4557 and true-async-server 4763. Both run on the same machine, in the same round, against the same profiles.
Is hyperf faster than php-fpm?
hyperf is ahead of php-fpm on 9 of the 12 tests they both run, and behind on 3. On the HTTP/1.1 composite hyperf scores 1632 and php-fpm 1259. Both run on the same machine, in the same round, against the same profiles.
Which PHP framework is fastest overall?
true-async-server holds the highest HTTP/1.1 composite of the PHP web frameworks, at 4763. The composite is throughput over the whole suite; if a service is one shape of workload, compare that profile on its own in the table above, because the order changes.
Every PHP entry
Results updated · PHP composite ranking · Compare across languages · Other languages · Open the leaderboard