nette/application — pull request #35 by JanTvrdik (2014-10-05 18:53:08+00:00)
Title: Router: optimized for a single immutable $refUrl instance

This makes it about 50 % faster with the following benchmark. However it relies on `$refUrl` being immutable.

```php
$time = -microtime(true);
$routerB = new RouteList();
$routerB[] = new Route('', 'Homepage:default');
$routerB[] = new Route('sign-in', 'Auth:signIn');
$routerB[] = new Route('sign-out', 'Auth:signOut');
$routerB[] = new Route('sign-up', 'Auth:signUp');
$routerB[] = new Route('sign-up-confirm', 'Auth:signUpConfirm');
$routerB[] = new Route('forgotten-pass', 'Auth:forgottenPassword');
$routerB[] = new Route('view', 'Product:view');
$routerB[] = new Route('manage', 'Product:manage');
$routerB[] = new Route('dashboard', 'Dashboard:default');
$routerB[] = new Route('admin', 'Admin:default');

for ($i = 0; $i < 10000; $i++) {
$routerB->constructUrl($appRequest, $refUrl);
// $routerB->match($httpRequest);
}
$time += microtime(true);

echo round($time * 1000, 2) . " ms\n";
```