benchmarking. That was actually _the_ point, which makes this benchmark
useless for me...
because different implementations often differ in different situations.
Post by Yo-An Linsymfony/routing only got 4873.17 #/sec while phux got 16777.12 #/sec
symfony/routing only got around 200-300 #/sec while phux got around 1600-1800 #/sec
cat dispatch.txt
n=10000
Runing symfony/routing - . 6664.4093423989/s
Runing phux extension - . 16501.898328291/s
Rate Mem phux extension symfony/routing
phux extension 16K/s 5M -- -40%
symfony/routing 6K/s 786K 247% --
================================== Bar Chart
==================================
phux extension 16K/s |
¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i |
symfony/routing 6K/s | ¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i¢i
|
============================== System Information
==============================
PHP Version: 5.5.6
Yeah I know, the benchmark is pretty rough. Because its a two day work. :p
The details will come up later.
[Sent from iPhone]
Post by Lin Yo-AnHi folks,
Glad to announce that the first version of Phux PHP Router is released.
https://github.com/c9s/phux
Phux is basically a rewrite of PHP Roller router.
Phux provides full functional C extension and pure PHP library with the
same interface, so the extension is optional to install.
but if you install phux extension, you may enjoy the performance of routing.
Route Dispatch Benchmark (Symfony/Routing and Phux pure PHP)
https://raw.github.com/c9s/Phux/master/benchmarks/reqs.png
Hi,
Not a comment about Phux directly, but I think I have to point this out
(sadly: once more): When you use Apache Benchmark to benchmark the
performance of an PHP-component, you in fact benchmark your system... [1]
Another flaw is, that the whole benchmark setup is missing, which makes it
slightly suspicious and unreliable. Two things, that spontanous came into
my mind
- Because you use ab to benchmark it is unlikely, that the S2-setup
contains the routing-component only. This means, that in this benchmark you
measure more than just the routing. OK, the README states, that "Testing
with route dispatch only. (no controller)", but information on how do the
benchmarks setup the routing is missing.
- Like so many other benchmarks improvments, that every S2-application
relies in production on, are probably missing. Do you compile the
routing-table from a config into PHP? Do you use APC? While it sounds
totally fair to compare two bare setups, it isn't. It probably ignores
customizations, that are possible in one, but not the other and that
affects the outcome. Most obvious example is what I mentioned: Parsing a
YAML, generating the routing table and routing is something very different
than reading the routing-table from an APC-cached PHP-file and routing.
I don't say Phux is bad or something, but my advice is to rework the
benchmark and publish the setup. Beside this I am more interested in
benchmarks of the C-extension (especially against the native-PHP solution)
:)
Regards,
Sebastian
[1] The worst thing about this, is that you not only benchmark the target
system, but the benchmark also relies heavily on the local one. Even worse
than worse: Running both on the same machine let them affect each other in
a non-predictable way. You get numbers, but you can never tell, what they
mean.
--
github.com/KingCrunch