veonik / php-router-benchmark

Benchmarks of different routing solutions
MIT License
50 stars 11 forks source link

setup r3 router benchmark #10

Closed c9s closed 9 years ago

c9s commented 9 years ago

This PR setups a router benchmark for php-r3 http://github.com/c9s/php-r3

Worst-case matching

This benchmark matches the last route and unknown route. It generates a randomly prefixed and suffixed route in an attempt to thwart any optimization. 1,000 routes each with 9 arguments.

This benchmark consists of 6 tests. Each test is executed 1,000 times, the results pruned, and then averaged. Values that fall outside of 3 standard deviations of the mean are discarded.

Test Name Results Time + Interval Change
r3 - unknown route (1000 routes) 993 0.0000064563 +0.0000000000 baseline
r3 - last route (1000 routes) 999 0.0000089408 +0.0000024845 38% slower
FastRoute - unknown route (1000 routes) 963 0.0005773683 +0.0005709121 8843% slower
FastRoute - last route (1000 routes) 999 0.0006089654 +0.0006025091 9332% slower
Aura v2 - last route (1000 routes) 999 0.2159689919 +0.2159625356 3344993% slower
Aura v2 - unknown route (1000 routes) 985 0.2432910672 +0.2432846109 3768179% slower
c9s commented 9 years ago

Hi @tyler-sommer, can you take a look? Thanks!

tyler-sommer commented 9 years ago

Thanks for this, @c9s. Sorry about my slow response, I'll take a look at this over the weekend!

c9s commented 9 years ago

Thanks! No worries, sorry for bothering you in this way

Tyler Sommer notifications@github.com 於 2015年9月12日 星期六寫道:

Thanks for this, @c9s https://github.com/c9s. Sorry about my slow response, I'll take a look at this over the weekend!

— Reply to this email directly or view it on GitHub https://github.com/tyler-sommer/php-router-benchmark/pull/10#issuecomment-139669839 .