PHP web framework comparison: any two, head to head
swoole is ahead of hyperf on 12 of the 13 tests they both run, and behind on 1. On the HTTP/1.1 composite swoole scores 3175 and hyperf 1118.
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 |
| 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.6 | 39.7 | +85% | 117us | 366us |
| Latency-1M | 1,024 | 69.5 | 2.8 | +2382% | 210us | 13.67s |
| 8Gbit | 512 | 75.1 | 35.4 | +112% | 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 12 of the 13 tests they both run, and behind on 1. On the HTTP/1.1 composite swoole scores 3175 and hyperf 1118. 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 11 of the 14 tests they both run, and behind on 3. On the HTTP/1.1 composite swoole scores 3175 and php-fpm 848. 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 9 of the 14 tests they both run, and behind on 5. On the HTTP/1.1 composite swoole scores 3175 and true-async-server 3442. 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 8 of the 10 tests they both run, and behind on 1. On the HTTP/1.1 composite hyperf scores 1118 and php-fpm 848. 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 3442. 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